According to the Kepler's Third Law of Planetary Motion, if the orbital period of an object around a body is T and the radius of the orbit is R, then, the quotient between the square of the period and the radius elevated to the third power is constant for any object in orbit around the same body:
Let T₁ and R₁ represent the orbital period and the orbital radius of the first planet around Gliese 876, and let T₂ and R₂ represent the same magnitudes for the second planet. Then:
In the problem, R₂ is the unkown that we need to find. Isolate R₂ from the equation:
To find the distance of the second planet to its star, substitute the values for the known variables: T₁=59.9 d, R₁=3.18*10^7 km, T₂=121 d:
Therefore, the second planet is 5.08*10^7 km away from its star, Gliese 876.