- The weight of a body on the surface of a planet is given by \( W = \frac{GMm}{R^2} \), where \( G \) is the gravitational constant, \( M \) is the mass of the planet, \( m \) is the mass of the body, and \( R \) is the radius of the planet.
- The mass of the planet is related to its density and volume: \( M = \frac{4}{3} \pi R^3 p \), where \( p \) is the density.
- Since the body weighs the same on both planets, we equate the expressions for weight on both planets, which leads to the ratio of the radii \( R_2/R_1 = \sqrt[3]{p_1/p_2} \).
- Hence, the ratio of the radii of the planets is \( \frac{p_2}{p_1} \).