How to calculate
Express both sidereal periods in days. Take the reciprocal of the absolute difference of their orbital frequencies.
Worked example
Use First sidereal orbital period (days) 365.25 · Second sidereal orbital period (days) 686.98. The result is ≈ 779.9068939794 days.
Input and result notes
Assumes prograde orbits. With exactly equal periods the relative angular position does not cycle.
NASA on orbits and Kepler’s laws