Let P and Q be the two bodies,
the mass of body P = m1
And the mass of body Q = m2
As per the universal law of gravitation, the force of attraction between the earth and the body P is given by,
FP = {šŗ Ć š_š Ć š_1 \over š ^2}      ⦠(1)
Where, R is the distance of the body from the centre of the earth.
Similarly, the force of attraction between the earth and the body Q is given by
FQ = {šŗ Ć š_š Ć š_2 \over š ^2}      ⦠(2)
Since, the two forces, i.e., FP and FQ are equal, thus from (1) and (2),
{šŗ Ć š_š Ć š_1 \over š ^2}Ā =Ā {šŗ Ć š_š Ć š_2 \over š ^2}
ā¹ m1 = m2