How to find the equation of a line which intersects these lines at 90 degrees?
$p\equiv \dfrac{x}{2}=\dfrac{y+1}{0}=\dfrac{z-2}{1}$
$q\equiv \dfrac{x-1}{1}=\dfrac{y-2}{1}=\dfrac{z+5}{0}$
Since the third line has to be vertical on both of these lines, it has to be that its vector of direction is $\mathbf{c=}\begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ 2 & 0 & 1 \\ 1 & 1 & 0 \\ \notag \end{vmatrix}$ and I get $\mathbf{c}=-\mathbf{i}+\mathbf{j}+2\mathbf{k}$. And now I'm stuck.
Let $$\mathbf r_1=\mathbf u_1+s\mathbf v_1$$$$\mathbf r_2=\mathbf u_2+t\mathbf v_2$$the position vectors of the generic points of the lines.
Then solve the system $$\begin {cases} (\mathbf r_1-\mathbf r_2) \cdot \mathbf v_1=0 \\ \\ (\mathbf r_1-\mathbf r_2) \cdot \mathbf v_2=0\end {cases}$$
Finally substitutes the values of $s$ and $t$ to find the intersection points and so the equation of the line passing through them.