Suppose $A,B\in GL(2,\mathbb Z)$, and $AB=BA$. If $A,B$ are hyperbolic, i.e. their eigenvalues do not have length $1$, show that $A^n=B^m$ for some integers $n,m$ ($n^2+m^2\ne 0$).
I have tried to prove it using basic linear algebra. Suppose $v$ is a common eigenvector and $$Av=\lambda v,\quad Bv=\mu v.$$ We only need to show that $\lambda^n=\mu^m$. I expand the two identities above but cannot find anything useful.
Should we take into some background knowledge of hyperbolic automorphisms of $\mathbb T^2$?