When r > R

Solve[g 4 π r^2 4 π G M , g]

{{g (G M)/r^2}}


Created by Mathematica  (June 17, 2004)