The nice thing about the work-energy theorem is as long as nothing drastic happens between the beginning and the end points, we don't really care about what happens in the middle.

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

So

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

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.

-Dan