The kinetic energy needed to escape from the surface is given as,
E=12mve2
=12m(√2GmRe)2
=GMmRe
Since, the potential energy at the maximum height will be equal to the sum of half kinetic energy and the potential energy at the surface of the earth.
It can be written as,
−GMmRe+12GMmRe=−GMmRe+h
12Re=1Re+h
h=Re
The maximum height is Re.