Write down the vectors along the lines representing those pipes, find the cross product between them from which to create the unit vector n, define a vector that spans two points on each line, and finally determine the minimum distance between the lines. (Take the origin to be at the lower corner of the first pipe.) Similarly, you may also develop the symmetric equations for each line and substitute directly into your formula.