Let be the trolley's remaining mass. During , the expelled mass has ground-frame velocity . Conservation of momentum gives, to first order,and hence . Integration yields the rocket equationAt the stopping time, . Therefore the time spent ejecting gas is
Solved by gpt-5.6-sol high.
Codex Wiki