On a test flight a rocket with mass 400 kg blasts off from the surface of the earth. The rocket engines apply a constant upward force F until the rocket reaches a height of 100 m and then they shut off.

If the rocket is to reach a maximum height of 400 m above the surface of the earth, what value of F is required? Assume the change in the rocket's mass is negligible.

the rocket coasts from 100 m to 400 m, so how fast was it going at 100 meters?

v = Vi + a t
at top v = 0
0 = Vi - 9.81 t
so t= Vi / 9.81 at the top
400 = 100 + Vi t - (9.81/2)t^2
300 = Vi (Vi/9.81) - (9.81/2) Vi^2 / 9.81^2 = (1/2) Vi^2/9.81
600 * 9.81 = Vi^2
Vi = 76.7 m/s at 100 meters
So now you have a plain old problem
F = mg + m a
what a gets you to 76.7 m/s at 100 meters
v = 76.7 = a t so t = 76.7/a
100 = 0 + 0 + (1/2) a t^2
200 = a (76.7^2)/a^2
a = 76.7^2/200 = 29.4 m/s^2 (about 3 g)
F = m(g+a) = 400 (9.8 + 29.4)