Skip straight to Part 2 if you don't need to see how the change in gravitational potential energy was derived.
All units are SI units i.e. distance is all in metres and energy is in joules.
Part 1 - The derivation for the gravitational potential energy.
F - final
I - initial
ΔEP = - GmM/rF - (- GmM/rI)
ΔEP = - GmM/rF + GmM/rI
ΔEP = GmM/rI + GmM/rF (Switch signs)
ΔEP = GmM (1/rI - 1/rF) (Factorisation)
Part 2 - Finding GmM from the work done to move an object from 10,000,000 m to 20,000,000 m given the work required is 1.0 MJ
NOTE:
Avoid substituting 6 x 1024 kg into M for the planet as the question did not state the planet was Earth.
ΔEP = GmM (1/rI - 1/rF)
10,000,000 = GmM (1/10,000,000 - 1/20,000,000)
GmM = 10,000,000 / (1/10,000,000 - 1/20,000,000)
GmM = 2 x 1013
Part 3 - Using GmM to calculate work done to move object from 20,000,000 m to 80,000,000 m
ΔEP = GmM (1/rI - 1/rF)
ΔEP = 2 x 1013 (1/20,000,000 - 1/80,000,000)
ΔEP = 750,000 J