How do we know earth is the third planet away from the sun?
The crescent phases of Venus and mercury make it clear that they are inner planets to Earth.
By the revolution period of planets we can understand that position of planets from Kepler's 2nd and 3rd law.
Pictjure credit ESO .Org./you tube.
Kepler's third law relates the orbital period
We can measure the orbital periods of the planets by observing their positions with respect to the fixed stars.
Mercury and Venus both have orbital periods of less than a year and so are closer to the Sun than the Earth.
Mars and the outer planets all have orbital periods greater than a year and so are further away from the Sun than the Earth.
Therefore as Earth has the third longest orbital period it is the third planet from the Sun.