Let \( PQR \) be a triangle such that
\[
\vec{PQ}=-2\hat i-\hat j+2\hat k,\quad
\vec{PR}=a\hat i+b\hat j-4\hat k,\ a,b\in\mathbb{Z}.
\]
Let \( S \) be the point on \( QR \) which is equidistant from the lines \( PQ \) and \( PR \).
If
\[
|\vec{PR}|=9 \quad \text{and} \quad \vec{PS}=\hat i-7\hat j+2\hat k,
\]
then the value of \( 3a-4b \) is:
Show Hint
For equidistance from two lines through a point, always apply the angle-bisector condition using direction vectors.
Concept:
A point equidistant from two intersecting lines lies on the angle bisector.
Hence, vectors \( \vec{PS} \) must satisfy proportionality with unit direction vectors of \( PQ \) and \( PR \).
Step 1: Use the magnitude condition
\[
|\vec{PR}|=\sqrt{a^2+b^2+16}=9
\Rightarrow a^2+b^2=65
\]
Step 2: Use angle bisector condition
\[
\frac{\vec{PS}\cdot\vec{PQ}}{|\vec{PQ}|}
=\frac{\vec{PS}\cdot\vec{PR}}{|\vec{PR}|}
\]
Substitute vectors and simplify to obtain:
\[
a=7,\quad b=4
\]
Step 3: Compute the required expression
\[
3a-4b=21-16=5
\]
Final Answer:
\[
\boxed{5}
\]