Concept:
The gravitational potential energy of a mass \(m\) at a distance \(r\) from the centre of the earth is
\[
U=-\frac{GMm}{r}.
\]
Hence, the gain in potential energy is
\[
\Delta U=U_f-U_i.
\]
Step 1: Write the initial and final distances from the centre of the earth.
Initially, the object is on the surface of the earth.
\[
r_i=R.
\]
It is raised to a height equal to the radius of the earth.
\[
h=R.
\]
Therefore,
\[
r_f=R+R=2R.
\]
Step 2: Calculate the change in gravitational potential energy.
\[
\Delta U
=
-\frac{GMm}{2R}
-
\left(-\frac{GMm}{R}\right).
\]
\[
\Delta U
=
\frac{GMm}{R}
-
\frac{GMm}{2R}.
\]
\[
\Delta U
=
\frac{GMm}{2R}.
\]
Step 3: Express the answer in terms of \(g\).
Since
\[
g=\frac{GM}{R^2},
\]
we have
\[
GM=gR^2.
\]
Substituting,
\[
\Delta U
=
\frac{gR^2m}{2R}.
\]
\[
\Delta U
=
\frac{mgR}{2}.
\]
Step 4: Write the final answer.
\[
\boxed{\Delta U=\frac{mgR}{2}}
\]
\[
\boxed{\text{Answer = (A)}}
\]