<s>[INST] find the distance between two skew lines Given the following parametric find the distance between the two lines:
$x=2+t\;,\;\; y=1+6t\;,\;\; z=2t$ and
$x=1+2s\;,\;\; y=6+14s\;,\;\; z=-1+5s$
I tried using a point on the first line called P and entered $s=0$ and $s=2$ to get q and r. I then took the cross product of qr and qp then used the distance formula but this didn't seem to work.
 [/INST] You can write a point on the first line as $P = (2,1,0) + t(1,6,2)$ and a point on the second line as $Q = (1,6,-1) + s(2,14,5)$. If you take the difference $P - Q$ you get $(1,-5,1) + t(1,6,2) + s(-2,-14,-5)$. 
So your problem is equivalent to finding the distance between the plane given by $(1,-5,1) + t(1,6,2) + s(-2,-14,-5)$ and the origin. The first step here is to find a normal vector $\mathbf{n}$ to the plane, you can use $\mathbf{n} = (1,6,2) \times (-2,-14,-5) = (-2,1,-2)$. Now take any vector $\mathbf{v}$ in the plane (for example, $\mathbf{v} = (1,-5,1))$ you can compute the distance as: 
$$D = \frac{|\mathbf{v} \cdot \mathbf{n}|}{||\mathbf{n}||} = \frac{|-2 - 5 - 2|}{\sqrt{4 + 1 + 4}} = \frac{9}{3} = 3$$
In general, if your lines are given by $\mathbf{p} + t\mathbf{v}$ and $\mathbf{q} + s\mathbf{w}$, you can compute:
$$D = \frac{|(\mathbf{p} - \mathbf{q}) \cdot \mathbf{n}|}{||\mathbf{n}||}; \qquad \qquad \mathbf{n} = \mathbf{v} \times \mathbf{w}$$
</s>