Using transit photometry astronomers were able to discover Trappist b through h. Based on this question we learn that the naming of planets is based on their distance from their star (b being the closest).
But how do we actually determine the distance from the star? From my understanding with transit photometry we basically just see a shadow against the backdrop of the star. That can tell us the planet exists, but how do we know the distance between the planet and the star?