Newton’s law of gravitation states that every object in the universe attracts every other object with a force which is directly proportional to the product of their masses and inversely proportional to the square of the distance between them.
F = \(\frac{Gm_1m_2}{d^2}\)
Acceleration due to gravity g = \(\frac {GM}{R^2}\)
Where G is gravitational constant
M is the mass of the earth
R is radius of the earth
Ratio of acceleration due to gravity = 1 : 4
Ratio of radii of two bodies = 1 : 3
Acceleration due to gravity is g

Dividing Equation (1) by equation (2) We get

∴ M1 : M2 = 1 : 36
∴ Ratio of their masses = 1 : 36