Let P be an arbitrary point on the ellipse called (a cos @, b sin @)
Use the eccentricity rule, that: <sup>PS</sup>/<sub>PM</sub> = e, where S is your positive focus, and M is the perpendicular from your positive directrix
Then, you have that PS = PM*e.
Now, you repeat for for S', which is the negative focus, and M' which is the perpendicular from the negative directrix.
So PS' = PM' * e
Then, just add PS with PS' = e(PM + PM') = 2a somehow