$${\left( \frac{P_1}{2\pi} \frac{2\pi}{P_2} \right)^2 = \frac{r_1^3}{GM}\frac{GM}{r_2^3}}$$