## Newtonian mechanics - mass of rocket

A rocket having initial mass m0 kg is launched vertically from the ground. the rocket expels gas at a constant rate of a kg/s and at a constant velocity b m/s relative to the rocket. Assuming that air resistance is proportional to the rocket velocity v(t) with prop. constant k, find the velocity of the rocket at t=6s, and after the mass mg kg of gas is used up.

Solution:

Let M be mass at any time t

M(t)' = -(at2)/2 + c
Solving gives M = m0 - (at2)/2

After this I'm not sure how to use the forces. Can someone help with the next steps please? Thanks.