If $AB = BA^2$ and $B^5 = I,$ Then how can we prove $A^{31} = I.$ 
If $A$ and $B$ are two non singular matrices, $AB = BA^2$ and $B^5 = I,$ then how can we prove $A^{31} = I$?

$\bf{My\; Trial::}$ Using $B^5 = I\Rightarrow B^5A^5 = IA^5 = A^5\Rightarrow B^4BA^2A^3 = A^5$
Now Using $BA^2 = AB$, we get $B^4ABA^3 = A^5\Rightarrow B^4ABA^2A=A^5\Rightarrow B^4A^2BA=A^5$
I did not understand How can I prove it.
plz Help me
Thanks

Your first equation can be written as 
$$B^{-1}AB=A^2$$
If we conjugate by $B$ again we get
$$B^{-2}AB^2=B^{-1}A^2B=B^{-1}AB B^{-1}AB=A^2 A^2=A^4$$
Iterating this we get 
$$B^{-5}AB^5=A^{2^5}$$
or 
$$A=A^{32}$$ and this gives 
$$A^{31}=I.$$
