Let the mass of the moon be m and the mass of the earth be M. r=the radius of the moon's orbit.
Gravitational force between the moon and earth = GMm/r2,
where G=6.67×10-11Nm2/kg2 and r=384000000=3.84×108m.
The circular motion creates a centripetal force on the moon=mv2/r, where v is the velocity in orbit.
These two forces are equal and opposite:
GMm/r2=mv2/r. The length of the orbit is 2πr and the moon takes time T (orbital period) to travel a complete orbit, therefore T=2πr/v, so v=2πr/T. The centripetal force is 4π2rm/T2.
GMm/r2=4π2rm/T2, M=4π2r3/(GT2), r3=5.66231×1025m3, T=27.3 days=2358720 seconds, T2=5.56356×1012 s2.
M=(4π2)(5.66231×1025)/(6.67×10-11×5.56356×1012)=6.02386×1024kg.
So the mass of the earth is 6.024×1021 metric tonnes approx.