Apply the energy principle. Define the system as the rocket and Moon. Treat both Moon and the rocket as point particles, meaning that they only have rest energy and kinetic energy. And of course, there is energy due to their gravitational interaction, which is called gravitational potential energy. The energy principle states that
Substitute the energy of the system which is the sum of the particle energies and their interaction energy.
Write the particle energy as the sum of its rest energy and kinetic energy. Note that rest energy cancels out of both sides of the equation, if we assume that the mass of the rocket and Moon haven't changed during the process.
Define the initial and final states of the system. The initial state of the system is when the rocket has reached the required launch speed. At this point, its engines turn off and its only interaction is with Moon. Assume that this occurs reasonably close to Moon.The final state of the system is when the rocket is very far away ( ).
The initial and final positions of the rocket and Moon.
Since its engines are off, there are no external forces on the system. We will neglect the gravitational pull of Earth and Sun and treat the system as a two-body system. Thus, the work done on the system by its surroundings is zero.
Substitute expressions for the kinetic energy of the system.
Note that according to the momentum principle, since the net force on the system is zero, then the Moon recoils with the same magnitude momentum as the rocket ( and ), but in the opposite direction. Since Moon is so much more massive than the rocket, its kinetic energy is much smaller than the rocket and is therefore negligible. Thus,
Substitute an expression for the gravitational potential energy of the system.
In the final state, the rocket is far from Moon. Since 1 over infinity is zero, then
Substitute an expression for the speed of the rocket and solve for the initial speed of the rocket. Note that the mass of the rocket cancels out.
Note that the launch speed is greater than the final speed. This is expected since as the gravitational potential energy of the system increases with distance, the kinetic energy of the system decreases. Also, the launch speed is small compared to the speed of light, as expected for launching a rocket from a planet or moon.