how is GM=gR^2?
When an object is dropped from a height, it falls towards the earth. Thus, the acceleration produced in an object due to the force of gravity is known as acceleration due to gravity (g).
Acceleration due to gravity at the surface of earth
M − Mass of earth
m − Mass of body lying above the surface of earth
R − Radius of earth
According to Newton’s law of gravitation, the force of attraction between the body and the earth is
… (i)
However, the force with which a body is attracted towards the earth gives the weight of the body.
∴ F = mg … (ii)
Equating (i) and (ii),
I'd suggest you to go through the study material well. It has been explained well there.