Assume that $A$ and $B$ are different $n\times n$ matrices with $A^3=B^3, AB^2=B^2A.$ The question is whether $A^2+B^2$ is invertible or not.
I tried $$(A^2+B^2)(A-B)=A^3-B^3+B^2A-A^2B=B^2A-A^2B$$,but the assumption is $B^2A=AB^2$, so I don't know how to do next.
Hope for your help.Thanks.
We assume that $A,B\in M_n(\mathbb{C}),A^3=B^3,AB^2=B^2A$.
$\textbf{Proposition}$.When $B$ is invertible (then $A$ too), $A,B$ are simultaneously triangularizable.
$\textbf{Proof}$. Since $AB^2=B^2A$, $A,B^2$ are simultaneously triangularizable: $A=PUP^{-1},B^2=PVP^{-1}$ where $U,V$ are upper-triangular. Then $B=PU^3V^{-1}P^{-1}$, where $U^3V^{-1}$ is triangular. $\square$
In the sequel, we assume that $A,B$ are invertible.
According to the above proposition, if $spectrum(A)=(\lambda_j)_j$, then there is an ordering $(\mu_j)_j$ of $spectrum(B)$ s.t. ${\lambda_j}^3={\mu_j}^3$ and $\det(A^2+B^2)=\Pi_j({\lambda_j}^2+{\mu_j}^2)$; we conclude that $A^2+B^2$ is invertible.