Earth gravity = 9.8 m/s²
Moon gravity = 1.6 m/s²
Weight = (mass) x (gravity)
Divide each side by (gravity) and then it says:
Mass = Weight / gravity
Object on Earth: Mass = (30N) / (9.8 m/s²) = 3.06 kg
Object on Moon: Mass = (30N) / (1.6 m/s²) = 18.52 kg
If two objects have the same weight on Earth and on the Moon, then the one on the Moon must have more mass. Six times as much mass, in fact.