By solving mathematical equations describing the elliptical motion of the earth around the sun, and the moon around the earth. this involves evaluating integrals with respect to time of s range of trigonometrical equations, that cannot be shown within the formatting restrictions on the FunAdvice boards. But if you really want to know more take a look at the following link:
which I hope will open at page 434 read on from there.
Best wishes - Majikthise.
everything in space is traveling a specific path and speed, by tracking where it has been it can be predicted where it is going and when it will get there. In the same manner if you are traveling at 30 MPH, and you know you are heading for a town 5 miles away, it is easy to calculate you will arrive in 10 minutes.
We know the path and speed of the Earth, and the path and speed of the moon, so we can calculate when they will aligned, the alignment will cast a shadow that we call an eclipse.