<s>[INST] Find the line $l$ that goes through $P$ and intersects line $l_1$ and $l_2$. We have line $l_1:\begin{cases} x=1+t_1 \\ y=t_1 \\ z=-1+t_1\end{cases}$ and $l_2:\begin{cases} x=10+5t_2 \\ y=5+t_2 \\ z=2+2t_2\end{cases}$.
Find the line $l$ that goes through $P:(3, 2, −1)$ and intersects line $l_1$ and $l_2$.
I tried finding a point of intersection between line $l_1$ and $l_2$ but the equation I got is inconsistent.
$\begin{cases}
t_1-5t_2=9\\
t_1-t_2=5\\
t_1-2t_2=3
\end {cases}\iff \begin{pmatrix}1 & -5 & 9\\ 1 & -1 & 5\\ 1 & -2 & 3  
 \end{pmatrix} \iff \begin{pmatrix}1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1  
 \end{pmatrix} $. So there is no point of intersection. How do I find the line that goes through $P$ and intersects $l_1$ and $l_2$?
 [/INST] First, find the plane that contains the point $Q=(3, 2, -1)$ and the line $\ell_1$.  To do that, find a point on $\ell_1$, for example, by substituting $t_1 = 0 $, then $P_1 = (1, 0, -1)$ is on this plane as well as $Q=(3, 2, -1)$.
The direction vector of $\ell_1$ is $v_1 = (1, 1, 1)$.  Now define the vector
$v_2 = P_1 - Q = (-2, -2, 0) $
So that the normal to the plane containing $Q$ and $\ell_1$ is
$ N = v_1 \times v_2 = (1, 1, 1) \times (-2, -2, 0) = (2 , -2 , 0 ) $
Hence, the equation of the plane is
$ (2, -2, 0) \cdot (p - Q) = 0 $
Next, find the intersection of $\ell_2$ with this plane, by substituting
$ p = (10, 5, 2) + t_2 (5, 1, 2) $
into the equation of the plane,
$ (2, -2, 0) \cdot ( (10, 5, 2) + t_2 (5, 1, 2) - (3, 2, -1) ) = 0$
From which
$ t_2 = \dfrac{   - 8 }{ 8 } = -1 $
Therefore, the point of intersection is $ P_2 = (10, 5, 2) - (5, 1, 2) = (5, 4, 0) $
Finally, the line connecting $Q$ and $P_2$ is the line we want, its equation is
$ \ell(t) = Q + t (P_2 - Q) = (3, 2, -1) + t ( 2, 2, 1 ) $
</s>