If two lines in three dimensions are parallel, the coefficients in the Cartesian equations are the same, since the coefficients of the Cartesian equation are the components of the tangent, which is the same for parallel lines.
Suppose we want to find the distance between the parallel lines
{jatex options:inline}\frac{x-x_1}{a}=\frac{y-y_1}{b}=\frac{z-z_1}{c}=t_1{/jatex}  (1)
{jatex options:inline}\frac{x-x_2}{a}=\frac{y-y_2}{b}=\frac{z-z_2}{c}=t_2{/jatex}  (2)
/> Rearrange (1) into vector form to give  {jatex options:inline}\mathbf{r}_1(t_1)= \begin{pmatrix}x_1\\y_1\\z_1\end{pmatrix}+ \begin{pmatrix}a\\b\\c\end{pmatrix}t_1{/jatex}
Rearrange (2) into vector form to give  {jatex options:inline}\mathbf{r}_2(t_2)= \begin{pmatrix}x_2\\y_2\\z_2\end{pmatrix}+ \begin{pmatrix}a\\b\\c\end{pmatrix}t_2{/jatex}
(2)-(1) gives  {jatex options:inline}\mathbf{r}_{12}= \begin{pmatrix}x_2-x_1\\y_2-y_1\\z_2-z_1\end{pmatrix}+ \begin{pmatrix}a\\b\\c\end{pmatrix}(t_2-t_1){/jatex}
We can take this vector as perpendicular to the tangent vector  {jatex options:inline}\begin{pmatrix}a\\b\\c\end{pmatrix}{/jatex}  for suitable values  {jatex options:inline}t'_1, \; t'_2{/jatex}  of  {jatex options:inline}t_1, \; t_2{/jatex}. Hence
{jatex options:inline}\begin{aligned} &( \begin{pmatrix}x_2-x_1\\y_2-y_1\\z_2-z_1\end{pmatrix}+ \begin{pmatrix}a\\b\\c\end{pmatrix}(t'_2-t'_1)) \cdot \begin{pmatrix}a\\b\\c\end{pmatrix} \\ &= \begin{pmatrix}x_2-x_1+a(t'_2-t'_1)\\y_2-y_1++b(t'_2-t'_1)\\z_2-z_1+c(t'_2-t'_1)\end{pmatrix} \cdot \begin{pmatrix}a\\b\\c\end{pmatrix}=0 \end{aligned}{/jatex}
This gives the equation
{jatex options:inline}\begin{aligned} & a(x_2-x_1)+a^2(t'_2-t'_1)+b(y_2-y_1)+b^2(t'_2-t'_1)+c(z_2-z_1)+c^2(t'_2-t'_1)=0 \\ & \rightarrow t'_2-t'_1=- \frac{a(x_2-x_1)+b(y_2-y_1)+c(z_2-z_1)}{a^2+b^2+c^2} \end{aligned}{/jatex}
{jatex options:inline}\begin{aligned} \left| \mathbf{r}_{12} \right| &= \sqrt{(x_2-x_1+a(t'_2-t'_1))^2+(y_2-y_1+b(t'_2-t'_1))^2+(z_2-z_1+c(t'_2-t'_1))^2} \\ &= \sqrt{(x_2-x_1-a( \frac{a(x_2-x_1)+b(y_2-y_1)+c(z_2-z_1)}{a^2+b^2+c^2}))^2+(y_2-y_1-b( \frac{a(x_2-x_1)+b(y_2-y_1)+c(z_2-z_1)}{a^2+b^2+c^2}))^2+(z_2-z_1-c( \frac{a(x_2-x_1)+b(y_2-y_1)+c(z_2-z_1)}{a^2+b^2+c^2}))^2} \\ &= \sqrt{\frac{(a(x_2-x_1)+b(y_2-y_1)+c(z_2-z_1))^2}{a^2+b^2+c^2}} \end{aligned}{/jatex}