Line: point (6,7,7), direction (3,2,−2).
General point on line: (6+3t,7+2t,7−2t).
Foot of perpendicular from P(1,2,a): PM⋅(3,2,−2)=0.
3(5+3t)+2(5+2t)−2(7−2t−a)=0
⇒17t+11+2a=0.
Image Q=2M−P=(11+6t,12+4t,14−4t−a).
Given Qx=5: 11+6t=5⇒t=−1.
From 17(−1)+11+2a=0⇒a=3.
b=12+4(−1)=8, c=14−4(−1)−3=15.
a2+b2+c2=9+64+225=298.