Anyone know how to figure this out mathematically?
Yes although it's not the lens maker formula you are using. Use the Gaussian equation for a thin lens which maps the object distance, z, to image distance, z'.
1/z' = 1/z + 1/f
That'll get you close. Note sign conventions states z is a negative value. Rays always trace from left to right, and distances to left (into object space) are negative while distances to right (image space) are positive. It's very biased against left handed people like me.
So knowing that z' = f for z = -infinity, solve for z when z' = f - 2mm or whatever the delta is. That will give you maximum distance you can bring to focus (assuming your lens has a hard stop at infinity).
So for 135 mm lens, 1 / (1/137 - 1/135) = -9257 mm is farthest you can focus, or objects 9.257 meters away.
For 50, it's about 1.3 meters.
There's a calculator on this page:
http://www.mystd.de/album/calculator/
Which will do this math if you enter the focal length and the difference in flange length (e.g. 2mm) as the extension tube value.
Btw I recommend a Field Guide to Geometric Optics by John Grievenkamp...my copy is from when I took his geometric optics course. Handy for looking up fundamental optical calculations.