How did ancient astronomers know that planets are much closer to earth than stars?
The planets moved against the background stars. Think of it this way – you are watching 2 people, one 500 meters away and the other only 50 meters away. Both are walking from your left to your right at 1 meter per second. The closer one will appear to be moving more against the background than the farther one. Same with the planets – they would move in the sky over weeks and months, while the stars didn’t appear to move much at all (the constellations would rise later each day, but the stars remained in the same positions relative ot each other year after year).