Show that $\operatorname{rank}(A^2+A+I_3)=1$

$A$ is a root of $x^{3}-1$, which has distinct roots, so $A$ can diagonalized over the complex numbers. Since it is a real matrix, and it is different from the identity, the diagonal form must be $$B =\begin{bmatrix} 1&&\\ &\omega&\\ &&\omega^{2} \end{bmatrix},$$ where $\omega$ is a primitive third root of unity. Since $1 + \omega + \omega^{2} = 0$, we have that $$ B^{2} + B + I = \begin{bmatrix} 3&&\\ &0&\\ &&0 \end{bmatrix} $$ has rank one. Now $A$ and $B$ are conjugate, and conjugacy preserves rank.


Since you know that $A^3=I$, we have $m_A(x)|x^3-1=(x-1)(x^2+x+1)$ (the minimal polynomial). Since the caracteristic polynomial and the minimal have the same irriducible factors, $m_A(x)\neq x^2+x+1$, since otherwise $p_A(x)=(x^2+x+1)^k$, but $\deg(p_A(x))=3$.
Since $A\neq I$, $m_A(x)\neq (x-1)$. Hence all your information is equivalent to $m_A(x)=x^3-1=(x-1)(x^2+x+1)$. Hence $A$ is diagonalizable over $\mathbb{C}$ to the form $D=diag(1,\alpha,\beta)$ where $\alpha,\beta$ are the roots of $x^2+x+1=0$.
Write $A=PDP^{-1}$. Then $A^2+A+I=P(D^2+D+I)P^{-1})$ and $rank(D^2+D+I)=1$ (you should see easily why). Hence $rank(A^2+A+I)=1$.


Hint: What can you say about the minimal polynomial of $A$?