Find the line through M(-5,2,-1) that intersects the line…
Find the line through $M(-5,2,-1)$ that intersects the line $\ell$ at a right angle, where $\ell:\ \frac{x-1}{3}=\frac{y}{5}=\frac{z+2}{-2}$.
Explanation of Method
The line through a given point that meets a given line at a right angle.
Step 1: Setup
$\ell$ passes through $(1,0,-2)$ with direction $\vec d=\{3,5,-2\}$. A general point of $\ell$ and the vector from $M$ to it are
\[ A=(1+3t,\ 5t,\ -2-2t),\qquad \overrightarrow{MA}=\{6+3t,\ 5t-2,\ -1-2t\}. \]
Step 2: Perpendicularity
\[ \overrightarrow{MA}\cdot\vec d=3(6+3t)+5(5t-2)-2(-1-2t)=38t+10=0\ \Longrightarrow\ t=-\tfrac{5}{19}. \]
\[ A\left(\tfrac{4}{19},\ -\tfrac{25}{19},\ -\tfrac{28}{19}\right),\qquad \overrightarrow{MA}=\tfrac{9}{19}\{11,-7,-1\}. \]
Step 3: Result
\[\frac{x+5}{11}=\frac{y-2}{-7}=\frac{z+1}{-1}\]
Checks: $\{11,-7,-1\}\cdot\{3,5,-2\}=33-35+2=0$. For $A$, all three ratios of $\ell$ equal $-\tfrac5{19}$, and all three ratios of the new line equal $\tfrac9{19}$. $\checkmark$
The distance from $M$ to $\ell$ is $|MA|=\tfrac{9}{19}\sqrt{171}=\tfrac{27}{\sqrt{19}}\approx6.19$.
Result
\[\boxed{\,\frac{x+5}{11}=\frac{y-2}{-7}=\frac{z+1}{-1}\,}\]