Dynamic 3D distance calculation

Got another tough one for you all the gurus out there… :genius: senocular??

Is there a way to calculate the distance between the origin of a movieClip at, say, (x:500, y:0, z:0) and one at, (x:500, y:0, z:50)?? And lets say the vanishing point is (0,0) and the perspective angle is 50.

I know that the eq for finding the distance between two points in 3D space is:
d = ((x1-x2)^2 +(y1-y2)^2+(z1-z2)^2)^(1/2)

the problem is I dont know x2 (the x value of MC2 (the one set at z = 50)).

see: http://b-ed.com/perspectiveTetst.swf
also: http://b-ed.com/perspectiveTetst.jpg

any help would be great

-=b=-