Ive worked it out a different way... does this make sense:
x(t) = 2 + t
y(t) = -1 –t
z(t) = t
x(t) = 3 – s
y(t) = 1
z(t) = 1 + s
The directional vectors u and v, of the two lines are taken from the coefficients of the respective parameters.
u = <1, -1, 1>
v = <-1, 0, 1>
The minimum distance between them is perpendicular to both directional vectors. Take the cross product.
n = u x v = <1, -1, 1> x <1, 0, 1> = <-1, 2, -1>
Calculate a point on each line by setting the parameters (t) equal to zero.
P=(2,-1,0) Q=(3,1,1)
The two skew lines can be contained in parallel planes that have the normal vector n. The distance from any point on one plane to the other plane will be the same. Calculate the parallel plane that contains the first line. Use point P and the normal vector. For a vector in the plane use the arbitrary point R(x, y, z). The dot product of orthogonal vectors is zero.
n • PR = 0
<-1, 2, -1> • <x - 2, y + 1, z - 0> = 0
(x - 2) - 2(y + 1) + -1(z - 0) = 0
x - 2 - 2y - 2 -z = 0
x - 2y –z – 4 = 0
The distance from point Q in the second plane to the first plane is the minimum distance between the skew lines.
D= (|ax_1+ by_1+ cz_1+ d|)/√(a^2+ b^2+ c^2 )
D= (|3 -2 -1 -4|)/√(1^2+ 〖(-2)〗^2+ 〖(-1)〗^2 )
D= (-4)/√(1+4+1)= (-4)/√6= -1.632