Let $A=(3,4,5), P=(-1,2,4)$
$B=(4,6,3)$ and $Q=(1,0,5)$
$\therefore $ Dr's of line $A B$ are $(4-3),(6-4),(3-5)=1,2,-2$
and Dr's of line $P Q$ are $(1+1),(0-2),(5-4)=2,-2,1$
$\therefore $ Dc's of line $P Q=\frac{2}{\sqrt{2^{2}+(-2)^{2}+1}}, \frac{-2}{3}, \frac{1}{3}$
$=\frac{2}{3}, \frac{-2}{3}, \frac{1}{3}$
$\therefore $ Projection of line segment $A B$ on the line $P Q$ is
$\left|\frac{2}{3}(1)+\left(\frac{-2}{3}\right)(2)+\left(\frac{1}{3}\right)(-2)\right|=\frac{4}{3}$