When the rocket will reach at maximum height, then the total gravitational potential energy at this height will be equal to the sum of kinetic energy at the surface of earth and the potential energy when the rocket was at the earth's surface. ∴‌‌−‌