Find the two points where the shortest distance occurs on two lines Find the point P on $\vec{AB}$ and point Q on $\vec{CD}$ such that $\vec{PQ}$ is the shortest distance
between the lines AB and CD, given $\vec{AB} = \begin{pmatrix}
1\\ 
0\\ 
2\\
\end{pmatrix}
+ u\begin{pmatrix}
-2\\
2\\
1\\
\end{pmatrix}     
,\vec{CD} = \begin{pmatrix}
0\\ 
1\\ 
1\\
\end{pmatrix}
+ v\begin{pmatrix}
2\\
-1\\
-2\\
\end{pmatrix}     
$ the normal vector $n=\begin{pmatrix}
-3\\
-2\\
-2\\
\end{pmatrix} 
$ 
and the shortest distance is $\frac{3}{\sqrt{17}}$. I figured all this out from 4 given points but don't know how to find points P and Q. Please help, I'm stuck...

If the normal vector is not provided in the question, you can still solve the question.
Any point $P$ on line $\vec{AB}$ given $u$ can be represented as
$\begin{pmatrix}
  1-2u \\
2u\\
2+u
\end{pmatrix}$
, whilst point any point $Q$ on line $\vec{CD}$ given $v$ can be represented as
$\begin{pmatrix}
  2v \\
1-v\\
1-2v
\end{pmatrix}$,
$\vec{PQ}=$
$\begin{pmatrix}
-1+2u+2v \\
1-2u-v\\
-1-u-2v
\end{pmatrix}$
You can interpret the shortest distance between $\vec{AB}$ and $\vec{CD}$ at points $P$ and $Q$ as a separate line that is perpendicular to both $\vec{AB},\vec{CD}$ at the same time, similar to how the shortest distance from a point to a line functions:
$$
\vec{PQ} \perp \vec{AB} \\
\vec{PQ} \perp \vec{CD}
$$
The dot product between two perpendicular vectors is 0, which gives:
$$
\vec{PQ} \cdot \vec{AB} =
\begin{pmatrix}
-1+2u+2v \\
1-2u-v\\
-1-u-2v
\end{pmatrix}
\cdot
\begin{pmatrix}
-2 \\
2\\
1
\end{pmatrix} =
0 \\
\vec{PQ} \cdot \vec{CD} =
\begin{pmatrix}
-1+2u+2v \\
1-2u-v\\
-1-u-2v
\end{pmatrix}
\cdot
\begin{pmatrix}
2 \\
-1\\
-2
\end{pmatrix} =
0 
$$
Which gives the following system of equations
$$
\begin{aligned}
3-9u-8v = 0\\
-1+8u+9v=0
\end{aligned}
$$
Solving for $u,v$ gives $u=\frac{19}{17},v=-\frac{15}{17}$, which can be substituted back to calculate the coordinates of $P$ and $Q$, giving $P=(\frac{38}{17}, \frac{53}{17}, -\frac{21}{17}), Q=(-\frac{30}{17}, \frac{32}{17}, \frac{47}{17})$
