Take a look at the formula that relates the distance to the subject (p), the distance to the image (q), and the focal length of the lens (f)..............

1/p + 1/q = 1/f

As p increases toward infinity, 1/p goes to zero, and 1/q = 1/f. So, for an object at infinity, the focal length equals the distance from the lens to the image (and hopefully, the film).

Of course, this formula is based on a simple thin lens, and not a complex multi-element design. The basic idea is the same, though.