Centroid \( G \) of triangle \( ABC \):
\[ G = \left( \frac{x_A + x_B + x_C}{3}, \frac{y_A + y_B + y_C}{3}, \frac{z_A + z_B + z_C}{3} \right). \] Given: \( G = \left( -\frac{4}{3}, \frac{1}{3}, -\frac{4}{3} \right) \), vertices \( A(5, 1, p) \), \( B(1, q, p) \), \( C(1, -2, 3) \).
x-coordinate:
\[ \frac{5 + 1 + 1}{3} = \frac{7}{3} \neq -\frac{4}{3}. \]
Recompute using vector method: Centroid formula holds. Correct x-coordinate:
\[ \frac{5 + 1 + 1}{3} = \frac{7}{3} \]
possible error in problem. Use given centroid.
y-coordinate:
\[ \frac{1 + q + (-2)}{3} = \frac{1}{3} \Rightarrow 1 + q - 2 = 1 \Rightarrow q - 1 = 1 \Rightarrow q = 2. \] z-coordinate:
\[ \frac{p + p + 3}{3} = -\frac{4}{3} \Rightarrow 2p + 3 = -4 \Rightarrow 2p = -7 \Rightarrow p = -\frac{7}{2}. \] Answer: \( p = -\frac{7}{2} \), \( q = 2 \).
