We are given a point \( P(1, 2, a) \) and its image \( Q(5, b, c) \) in a given line.
For a point and its image in a line, the line acts as the perpendicular bisector of the segment joining the point and its image.
Step 1: Write the parametric form of the given line.
From
\[
\frac{x - 6}{3} = \frac{y - 7}{2} = \frac{7 - z}{2} = t,
\]
we get
\[
x = 6 + 3t,\quad y = 7 + 2t,\quad z = 7 - 2t.
\]
Step 2: Find the foot of the perpendicular from \( P \) to the line.
Let the foot of the perpendicular be
\[
R(6 + 3t, 7 + 2t, 7 - 2t).
\]
Since \( R \) is the midpoint of \( P \) and \( Q \),
\[
R = \left( \frac{1 + 5}{2}, \frac{2 + b}{2}, \frac{a + c}{2} \right)
= (3, \tfrac{2+b}{2}, \tfrac{a+c}{2}).
\]
Step 3: Equate coordinates to find \( t, a, b, c \).
From the \( x \)-coordinate,
\[
6 + 3t = 3 \Rightarrow t = -1.
\]
Substitute \( t = -1 \),
\[
R = (3, 5, 9).
\]
Comparing coordinates,
\[
\frac{2 + b}{2} = 5 \Rightarrow b = 8,
\]
\[
\frac{a + c}{2} = 9 \Rightarrow a + c = 18.
\]
Step 4: Use direction ratios to find \( a \) and \( c \).
Direction ratios of the line are \( (3, 2, -2) \).
Vector \( \overrightarrow{PQ} = (4, b - 2, c - a) \) is parallel to the line.
Thus,
\[
\frac{4}{3} = \frac{6}{2} = \frac{c - a}{-2}.
\]
From this,
\[
c - a = -4.
\]
Solving
\[
a + c = 18,\quad c - a = -4,
\]
we get
\[
a = 11,\quad c = 7.
\]
Step 5: Calculate \( a^2 + b^2 + c^2 \).
\[
a^2 + b^2 + c^2 = 11^2 + 8^2 + 7^2
= 121 + 64 + 49 = 283.
\]
Final Answer:
\[
\boxed{283}
\]