Given: $Q(2,3,5)\:\:and\:\:R(1,-1,4)$.
Eqn. $\overline {QR}$ is $\large\frac{x-2}{1}=\frac{y-3}{4}=\frac{z-5}{1}=\lambda$......(i)
Any point $(x,y,z)$ on the line $QR$ can be expressed in terms of $\lambda$,
$\therefore$ Let foot of $\perp$ from $T(2,1,4)$ on the line $\overline {QR}\:\:\:\: be\:\:\:S (\lambda+2,4\lambda+3,\lambda+5)$ (from (i))
$\Rightarrow\:\:\:\overline {TS}$ is $\perp$ to the line $\overline { QR}$
$\therefore\:$ $(d.r.\:\: of\:\:\:\overline {QR}).(d.r.\:\:of \:\:\overline {TS})=0$
$\Rightarrow\:(1,4,1).(\lambda,4\lambda+2,\lambda+1)=0$
$\Rightarrow\:\lambda+16\lambda+8+\lambda+1=0$ or $ \lambda=-\large\frac{1}{2}$
$\therefore\:S(\large\frac{3}{2},$$1,\large\frac{9}{2})$
Given the line $\overline{QR}$ cuts the plane $5x-4y-z-1=0$ at the point $ P$
Let $P$ be assumed in terms of $\lambda$ from (i) as $P(\lambda+2,4\lambda+3,\lambda+5)$
Since $P$ is the intersecting point of the line (i) and the plane, $p$ satisfies the eqn. of the plane.
$\therefore \:5(\lambda+2)-4(4\lambda+3)-(\lambda+5)-1=0$
$\Rightarrow\:5\lambda-16\lambda-\lambda+10-12-5-1=0$
$\Rightarrow\:\lambda=-\large\frac{2}{3}$
$\therefore P(\large\frac{4}{3},\frac{1}{3},\frac{13}{3})$
$\therefore$ distance $PS$ = $\sqrt {\frac{1}{36}+\frac{16}{36}+\frac{1}{36}}$
$=\frac{1}{\sqrt 2}$