Another way
How about using the fact that the moon orbits the earth - due to the earth’s gravity?
We know that the moon goes in (roughly) a circular orbit, and we can use Newton’s Second Law to relate that circular orbit to the Earth’s gravity: Fgravity = mmoon acircular
GMearthmmoon/Rearth-moon2 = mmoonw2Rearth-moon
or Mearth = w2Rearth-moon3/G .