It is not true in general that $A^2B^2=B^2A^2$ implies $AB=BA$. For example let
$$A = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} \quad \text{and} \quad B = \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix}$$
1
Bumbble Comm
On
No, just take the matrix (hope no miscalculations)
$ A = \bigg(\begin{array}{ll} 0 & 1 \\ 0 & 0 \end{array}\bigg) $
and
$ B = \bigg(\begin{array}{ll} 0 & 0 \\1 & 0 \end{array}\bigg) $
It is not true in general that $A^2B^2=B^2A^2$ implies $AB=BA$. For example let $$A = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} \quad \text{and} \quad B = \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix}$$