The value of g on the moon is g = GM/R2 where
M is the mass of the moon, R is the radius of the moon
M is the mass of the moon, R is the radius of the moon and if the value of g is found on the earth then M will be the mass of the earth and R will be the radius of the earth.