maybe this comes a little bit late ...
If then the equations of the lines can be written like this:
If and are the position vectors to the fixed points of the lines, and the direction vectors of the lines and is the normal vector to and then the distance d is calculated by:
2. Now plug in all the values you know into the equation to calculate the distance: