The physics
Kepler found three rules for planets from careful sky records. Newton's law of gravitation explains all three.
First, each planet flies an ellipse. The Sun sits at one focus.
Second, a line from the Sun sweeps equal areas in equal times. So a planet moves fast near the Sun and slowly far away. At the nearest and farthest points, v × r is the same.
vnear rnear = vfar rfar
Third, the lap time squared grows as the orbit's size cubed. For an ellipse, the size is a. It is the average of the nearest and farthest distances.
T² ∝ a³ a = (rnear + rfar) / 2
For a satellite, measure r from the planet's centre, not from the ground. Two satellites can go round the same way. They line up each time the faster one gains a lap.
1/t = 1/TA − 1/TB
The third law holds only for a pull that goes as 1/r². A very long rod pulls as 1/r. Then every orbit has the same speed, and T ∝ r.