Answer
$14.3\space Mm$
Work Step by Step
Here we use the principle of conservation of mechanical energy.
Final mechanical energy = Initial mechanical energy
$K+U=K_{0}+U_{0}$
$-\frac{GM_{E}m}{r}=\frac{1}{2}mV_{0}^{2}-\frac{GM_{E}m}{R_{E}}$
Where m is the rocket's mass, r is the distance from Earth's center at the peak & Earth's radius $R_{E}$ is the distance at launch. Solving for r gives.
$\frac{GM_{E}}{R_{E}}-\frac{1}{2}V_{0}^{2}=\frac{GM_{E}}{r}$
$\frac{1}{R_{E}}-\frac{V_{0}^{2}}{2GM_{E}}=\frac{1}{r}=\gt r=(\frac{1}{R_{E}}-\frac{V_{0}^{2}}{2GM_{E}})^{-1}$
Let's plug known values into this equation.
$r=(\frac{1}{6.37\times10^{6}}-\frac{(8.31\times10^{3}\space m/s)^{2}}{2\times6.67\times10^{-11}\space Nm^{2}/kg^{2}\times5.97\times10^{24}\space kg})^{-1}$
$r=(1.57\times10^{-7}-087\times10^{-7})^{-1}$
$r=1.428\times10^{7}m=14.3\space Mm$
Altitude of the rocket (h) = r - radius of earth
$h = 14.3 Mm - 6.37 Mm = 7.93\times10^{6}\space m=7930\space km$