Let's consider $A, B\in M_n(\mathbb C)$ such that $$A+B=I_n$$ and $$A^2=A^3$$ Prove that $$\det(I_n+AB)\neq0$$
From $A+B=I_n$ we have that $A^3+A^2B=A^2$, so $A^2B=0_n$
I supposed that $\det(I_n+AB)=0$, i.e. $$\det(I_n+A-A^2)=0$$ $$\det((I_n+A-A^2)A)=0$$ $$\det(A)=0$$ $$\det((I_n+A-A^2)(A-I_n))=0$$ $$\det(A^2-I_n)=0$$ $$\det((A^2-I_n)(A-I_n))=0$$ $$\det(A-I_n)=0$$
So far we have $\det(A)=\det(A-I_n)=\det(I_n+A-A^2)=0$ and $A^2(I_n-A)=0_n$ and I don't know how to find the mistake (I supposed that $\det(I_n+AB)=0$ ).
Suppose, by contradiction, that $I+AB$ is singular. Then, there is a nonzero vector $e$ such that $(I+AB)(e)=0$, which means that $(1) A^2e=e+Ae$. Applying $A$, we deduce $A^3e=Ae+A^2e=e+2Ae$. But $A^3=A^2$, so $e+Ae=e+2Ae$ and we deduce $Ae=0$. But then $A^2e=0$, and from (1) we deduce $Ae=-e$, so $e=0$ which is impossible.