Establish a relationship between g and G.
Let us assume a body of mass 'm' kept on the surface of the Earth of mass 'M'. The gravitational force exerted on the object equal to its weight. It is given as
F = W = mg
here g is the acceleration due to gravity.
Now according to the Newton's Law of Gravitation the force between the body and Earth is given as
F' = GMm/R2
here R is the distance between the two, which in this case will be the radius of the Earth (as body is kept on its surface) and G is the Newton's Gravitational Constant.
Now the two forces F and F' are same physically and in magnitude, thus
F = F'
mg = GMm/R2
the relation between g and G will be
g = GM / R2
consider earth to be sphere of mass Me and radius Re.
let whole mass of the earth is to be concentrated at the centre and a body of mass m is situated at the surface of the earth or at a small height above the surface.
so, acc. to newton's law of gravitation
F=G Me*m/Re2 1.
from eq. 1 aqnd 2.
G Me*m/Re2 =mg