There are three forces affecting the rocket in the vertical direction: the weight w, the upward force T, and the air resistance R.
We know that the upward force acts for 25.0 m, the cuts out, leaving only the weight and air resistance acting on the rocket. The max height of the rocket is 339 m.
Well over the entire upward trip the net work done is
What is the speed of the rocket at lift-off? 0 m/s. What is the speed of the rocket at its maximum height? 0 m/s. So the net change in kinetic energy is 0 J. Thus
(The T only operates for a displacement of 25.0 m. The other two forces operate for the full 339 m.)
You can finish from here.