(N/A) The gravitational potential energy of an object of mass $m$ at a distance $r$ from the centre of the earth of mass $M$ is given by $U = -\frac{GMm}{r}$.
Potential energy of the object at the surface of the earth $(r = R)$: $U_i = -\frac{GMm}{R}$.
Potential energy of the object at a height equal to the radius of the earth $(r = R + R = 2R)$: $U_f = -\frac{GMm}{2R}$.
Gain in potential energy $(\Delta U)$ = $U_f - U_i$.
$\Delta U = -\frac{GMm}{2R} - \left(-\frac{GMm}{R}\right) = \frac{GMm}{R} - \frac{GMm}{2R} = \frac{GMm}{2R}$.
Since $g = \frac{GM}{R^2}$,we have $GM = gR^2$.
Substituting this into the expression for gain in potential energy:
$\Delta U = \frac{(gR^2)m}{2R} = \frac{1}{2}mgR$.