We are given that:
\[
A = \begin{pmatrix} x & 2 \\ 2 & x \end{pmatrix}
\]
and
\[
\det(A^2) = 25.
\]
We are asked to find the value of \( x \).
Step 1: Recall that the determinant of a matrix product is the product of the determinants:
\[
\det(A^2) = \det(A) \cdot \det(A).
\]
Thus, we need to first calculate \( \det(A) \).
Step 2: The determinant of \( A \) is given by:
\[
\det(A) = \det \begin{pmatrix} x & 2 \\ 2 & x \end{pmatrix} = (x)(x) - (2)(2) = x^2 - 4.
\]
Step 3: Now, we can calculate \( \det(A^2) \):
\[
\det(A^2) = (x^2 - 4)^2.
\]
We are given that \( \det(A^2) = 25 \), so:
\[
(x^2 - 4)^2 = 25.
\]
Step 4: Taking the square root of both sides:
\[
x^2 - 4 = \pm 5.
\]
Step 5: Solving for \( x^2 \):
- If \( x^2 - 4 = 5 \), then \( x^2 = 9 \), so \( x = \pm 3 \).
- If \( x^2 - 4 = -5 \), then \( x^2 = -1 \), which has no real solutions.
Thus, the only possible solution is \( x = \pm 3 \).
Therefore, the correct answer is option (A).