Gravitational potential energy on the earth surface, Ur=−GMmR
Gravitational potential energy at a height h above the earth's surface, Uh=−GMmR+h
Uh=−GMmR+R=−GMm2R
Gain in gravitational potential energy =Uh−Ur
=−GMm2R−(−GMmR)=GMmR−GMm2R
=GMm2R=12mgR