I will consider the motion in two stages.
1. The Powered Stage
To get the final velocity at the end of the powered stage we can use:
To find the height h reached we can use:
2. The Unpowered Stage
The rocket is now moving under the influence of gravity.
We can use:
I will use the convention that "up is positive".
The equation becomes:
Applying the quadratic formula:
Ignoring the -ve root:
To get the total time of flight