Here we need to find the determinant of this matrix.
notice here it is block matrix.
This is a $ 2×2$ block matrix where the first and last and the second and third elements are the same. So, applying the formula for determinant of a block matrix as given here
When A = D and B = C, the blocks are square matrices of the same order and the following formula holds (even if A and B do not commute)
$det \begin{pmatrix} A & B\\ C& D \end{pmatrix} = det (A-B) \ det(A+B)$
https://en.wikipedia.org/wiki/Determinant#Block_matrices
here A = $\begin{pmatrix} x & a\\ a& x \end{pmatrix}$
and B = $\begin{pmatrix} a & a\\ a& a \end{pmatrix}$
using above formula determinant is
$f(x) = \begin{vmatrix} x-a & 0\\ 0 & x-a \end{vmatrix}\times \begin{vmatrix} x+a & 2a \\ 2a & x+a \end{vmatrix}$$= (x-a)^2[(x+a)^2 - 4a^2] = 0$
$\Rightarrow (x-a)^2(x+a)^2 = 4a^2(x-a)^2$
$\Rightarrow (x+a)^2 = 4a^2$
so, the given equation have two real roots $x= -3a$ or $x = a$