StackAdapt interview question

it is a gas moving problem