$ A^3 + B^2 = I_n $ and $A^5=A^2$, then $\det(A^2 + B^2 + I_n) \geq 0 $ and $\operatorname{rank}(I_n + AB^2) = \mathrm{rank}(I_n - AB^2) $ Let $A, B$ be square matrices of size $n$, $n \geq 2$, containing real entries.
$\DeclareMathOperator\rank{rank}$
If the following properties take place:    $ A^3 + B^2 = I_n  $ and $A^5=A^2$,
 then $\det(A^2 + B^2 + I_n) \geq 0  $ and  $\rank(I_n + AB^2) = \rank(I_n - AB^2) $.
So far, I've managed to solve the case when $ A $ is invertible.
When $A$ is not invertible, I've obtained $A^2B^2=O_n$, $\rank(A^2) + \rank(B^2) = n $, $\rank(A^2)=\rank(A^m),$ for every $m\geq 2$. All of the aforementioned these also hold when $A$ is invertible. 
I would also appreciate it if anyone can recommend me a textbook/book with problems like these.
 A: From the first condition, $B^2=1-A^3$, so that by the second,
$$ 0=A^2-A^5=A^2B^2=AB^2A=B^2A^2.$$
Now
$$(1-AB^2)(1+AB^2)=1-AB^2AB^2=1 $$
so that
$$\operatorname{rank}(1\pm AB^2)=n. $$

Note that 
$$ B^4=(1-A^3)^2=1-2A^3+A^6=1-A^3=B^2.$$
Let $U=\operatorname{im} B^2$ and $W=\operatorname{im} (1-B^2)$. Then for $u\in U$, we have $u=B^2v$ for some $v\in \Bbb R^n$ and so $B^2u=B^4v=B^2v=u$, i.e., $B^2$ acts as identity on $U$. Likewise, $B^2$ acts as zero map on $W$. We conclude $U\cap W=\{0\}$, and as each $v\in \Bbb R^n$ can be written as $v=B^2v+(1-B^2)v$, we conclude obtain the $B^2$-invariant direct sum decomposition $$\Bbb R^n=U\oplus W,$$ where also  $U=\ker(1-B^2)$, $W=\ker B^2$.
This  decomposition is also $A^2$-invariant:
As $A^2B^2=B^2A^2=0$, we see that $A^2$ maps $\Bbb R^n$ to $\ker B^2=W$ while acting as zero map on $U$.
Then $U,W$ are also $(1+A^2+B^2)$-invariant and we can compute the determinant blockwise. 
As $A^2$ acts as zero and $B^2$ as identity on $U$, we see that $(A^2+B^2+1)u$ acts as twice the identity on $U$.
On $W$, $1+A^2+B^2$ coincides with $A^2$. Therefore
$$\begin{align}\det(A^2+B^2+1)&=\det( (A^2+B^2+1)|_U)\det( (A^2+B^2+1)|_W)\\&=\det(2|_U)\det(A^2|_W)\\&=2^{\dim U}\det( A|_W)^2\\&\ge 0.\end{align}$$
A: To prove the determinantal inequality, note that the determinant is the product of eigenvalues of $C=A^2+B^2+I=2I+A^2-A^3$. Since each pair of conjugate pair of eigenvalues of $A$ gives rise to a pair of conjugate pair of eigenvalues of $C$, it suffices to prove that $f(x)=2+x^2-x^3\ge0$ for every real eigenvalue of $A$. However, by assumption, the polynomial $x^5-x^2=x^2(x-1)(x^2+x+1)$ annihilates $A$. Therefore the only possible real eigenvalues of $A$ are $0$ and $1$. Since $f(0)=f(1)=2>0$, we conclude that $\det(2I+A^2-A^3)\ge0$. (As $f(\omega)\ne0$ when $\omega$ is a primitive cubic root of unity, the determinant is actually positive.)
For the rank equality, I can't think of a simpler proof's than Hagen von Eitzen's.
