For the purposes of HSC Physics, just do what you did (like assume F = ma). However, the true formula for force is

F = dp/dt, where p = mv is momentum.

By the product rule, this yields F = m*dv/dt + v*dm/dt (provided we have a closed system).

If the mass is constant (dm/dt = 0), then we can see the formula reduces to the usual F = ma.

However, if the mass is changing over time (dm/dt is not identically 0), then we need to include that term. This is important for example for analysing motion of rockets that are propelled by burning fuel and ejecting spent gases. In fact, the equation then is slightly modified (since the system, called a variable mass system, is not closed). You can read more about this here:

https://en.wikipedia.org/w/index.php?title=Newton's_laws_of_motion&mobileaction=toggle_view_desktop#Variable-mass_systems .

But this is beyond the syllabus (despite being the actual result), and for the purposes of the HSC, you are expected to use the

(totally incorrect in this situation) formula F = ma.