Let the foot of the perpendicular from P(5,6,7) to the given line be Q.
Any point on the line 2x−2=3y−5=4z−2=λ is Q(2λ+2,3λ+5,4λ+2).
The direction ratios of PQ are (2λ−3,3λ−1,4λ−5).
Since PQ is perpendicular to the line, the dot product of their direction ratios is zero:
2(2λ−3)+3(3λ−1)+4(4λ−5)=0
4λ−6+9λ−3+16λ−20=0
29λ−29=0⇒λ=1
Substituting λ=1, the coordinates of Q are (4,8,6).
The square of the distance PQ2 is (5−4)2+(6−8)2+(7−6)2=1+4+1=6.
Answer: 6