<s>[INST] distance between 2 lines in 3d 
Calculate the distance between the lines
  $$L_1:x=4+2t,y=3+2t,z=3+6t$$
  $$L_2: x=-2+3s ,y=3+4s ,z=5+9s$$

I tried subtraction $L_1$ from $L_2$ then multiplying the resting vector by the $t$'s and $s$'s original values and trying to find value for $t$ to or $s,$ but I found $t=\frac{19}{12} s$ and I don't know how to keep solving this.
 [/INST] The distance between the lines
$L_1:x=4+2t,y=3+2t,z=3+6t$ and $L_2: x=-2+3s ,y=3+4s ,z=5+9s$ is
$d=2 \sqrt{10}$
Indeed consider the function which gives the distance between a generic point of the first line and a generic point of the second line
$f(t,s)=\sqrt{(2 t-4 s)^2+(-3 s+2 t+6)^2+(-9 s+6 t-2)^2}$
and set to zero the partial derivatives $\partial f_t=0,\partial f_s=0$
$\left\{
\begin{array}{l}
 4 (2 t-4 s)+4 (-3 s+2 t+6)+12 (-9 s+6 t-2)=0 \\
 -8 (2 t-4 s)-6 (-3 s+2 t+6)+18 (-9 s+6 t-2)=0 \\
\end{array}
\right.
$
$\left\{
\begin{array}{l}
 17 s-11 t=0 \\
 53 s-34 t=0 \\
\end{array}
\right.$
which has one solution
$t= 0,\;s=0$
we have
$f(0,0)=2 \sqrt{10}$
Hope it helps
</s>