Problems related to variable mass can be solved following these steps :
1. Make a list of all forces acting on the main mass and apply them on it.
2. Aplly an additional thrust force \vec{F_{t}} on the mass, the magnitude of which is \left|\vec{v_{r}} \left(\pm \frac{dm}{dt} \right)\right| where vr is relative velocity i.e, velocity of mass gained or masses ejected relative to the main mass, and the direction of \vec{v_{r}} is given by the direction of \vec{v_{r}} in case of mass increasing and otherwise the direction of -\vec{v_{r}} if mass is decreasing .
3. Find net force on the mass and apply \vec{F_{net}} =m\frac{d\vec{v}}{dt} ( m = mass at particular instant )
4. Integrate it with proper limits to find velocity at any instant of time t
now in abv problem mass is increasing so direction is \vec{v_{r}}
hence Fnet = F - Fthrust
Fnet = F - \vec{F_{net}} =\vec{v_{r}}\frac{dm}{dt}
had it been decreasing
Fnet = F + \vec{F_{net}} =\vec{v_{r}}\frac{dm}{dt}