Formula Kepler's Third Law (Orbital Periods, Semi-Major Axes)
$$\left( \frac{\class{blue}{T_1}}{\class{red}{T_2}} \right)^2 ~=~ \left( \frac{\class{blue}{a_1}}{\class{red}{a_2}} \right)^3$$ $$\class{blue}{T_1} ~=~ \class{red}{T_2} \, \left( \frac{\class{blue}{a_1}}{\class{red}{a_2}} \right)^{3/2}$$ $$\class{red}{T_2} ~=~ \class{blue}{T_1} \, \left( \frac{\class{blue}{a_1}}{\class{red}{a_2}} \right)^{-3/2}$$ $$\class{blue}{a_1} ~=~ \class{red}{a_2} \, \left( \frac{\class{blue}{T_1}}{\class{red}{T_2}} \right)^{2/3}$$ $$\class{red}{a_2} ~=~ \class{blue}{a_1} \, \left( \frac{\class{blue}{T_1}}{\class{red}{T_2}} \right)^{-2/3}$$
Orbital period of the 1st planet
$$ \class{blue}{T_1} $$ Unit $$ \mathrm{s} $$ Time it takes planet #1 to orbit a star (such as the Sun).
Orbital period of the 2nd planet
$$ \class{red}{T_2} $$ Unit $$ \mathrm{s} $$ Time a planet #2 needs to orbit the sun. So we need the data of two planets for the third Kepler law.
Semi-major axis from 1st planet
$$ \class{blue}{a_1} $$ Unit $$ \mathrm{m} $$ Planets travel around the star on elliptical orbits. The corresponding ellipse has a large semi-axis. It corresponds to half of the long axis of the ellipse. The traversed elliptic orbit is different for different planets. Here \(a_1\) is the semi-major axis of the elliptical orbit of planet #1.
Semi-major axis from 2nd planet
$$ \class{red}{a_2} $$ Unit $$ \mathrm{m} $$ Semi-major axis of another, second planet.