Let $D = diag(1,-I_2)$, and let $X \in M_3(\Bbb{R})$ be such that $X^2 = D$. I claim that $X$ is a solution if and only if
$$X = \begin{bmatrix} \pm 1 & 0 & 0 \\ 0 & a & b \\ 0 & c & -a \\ \end{bmatrix},$$
where $a^2 + bc=-1$.
The equation $X^2 = D$ implies $\det(X) = 1$ and therefore $X^{-1}$ exists. From the equation, and the invertibility of $X$, we can deduce $X = X^{-1}D$ and $X = DX^{-1}$ and therefore $X^{-1} D = DX^{-1}$, from which we get $DX=XD$. This itself implies that $X$ is of the form
$$X = \begin{bmatrix} x & 0 & 0 \\ 0 & a & b \\ 0 & c & d \\ \end{bmatrix}$$
Call the lower block $Z$, which will be a matrix in $M_2(\Bbb{R})$. Then the equation $X^2 = D$ now implies that $x = \pm 1$ and $Z^2 =-I_2$. The latter equation implies that $Z^2$ has eigenvalues $-1$, implying that $Z$ has eigenvalues $\pm i$. This implies that $Z$ is trace-zero, which gives us $d = -a$, and $a(-a) - bc = det(Z) = -i \cdot i = 1$ or $a^2 + bc = -1$.