<s>[INST] If $A$ and $B$ are matrices such that $AB^2=BA$ and $A^4=I$ then find $B^{16}$. 
If $A$ and $B$ are matrices such that $AB^2=BA$ and $A^4=I$, then find $B^{16}$.

My Method:
Given $$AB^2=BA \tag{1}$$ Post multiplying with $B^2$ we get
$$AB^4=BAB^2=B^2A$$ Hence
$$AB^4=B^2A$$ Pre Multiplying with $A$ and using $(1)$ we get
$$A^2B^4=(AB^2)A=BA^2$$  hence
$$A^2B^4=BA^2 \tag{2}$$  Now post multiplying with $B^4$ and using $(2)$we get
$$A^2B^8=B(A^2B^4)=B^2A^2$$ hence
$$A^2B^8=B^2A^2 \tag{3}$$
Now Pre Multiply with $B^2$ and use $(3)$ we get
$$B^2A^2B^8=B^4A^2$$ $\implies$
$$A^2B^8B^8=B^4A^2$$
$$A^2B^{16}=B^4A^2$$
Now pre multiply with $A^2$ and use $(2)$we get
$$A^4B^{16}=A^2B^4A^2$$ $\implies$
$$B^{16}=BA^4=B$$
is there any other approach to solve this?
 [/INST] $$B^2=A^4B^2=A^3BA.$$
Thus,
$$B^4=A^3BAA^3BA=A^3B^2A=A^2BA^2.$$
Hence, $$B^8=A^2BA^2A^2BA^2=A^2B^2A^2=ABA^3$$
and from here
$$B^{16}=ABA^3ABA^3=AB^2A^3=BA^4=B$$
</s>