Let
\[ A= \left [\begin{matrix} 3 & 1 \\ 0 & 1 \end{matrix} \right ] \]
and
$$
B=\left [{\begin{matrix}
1 & 0 \\
1 & 2 \\
\end{matrix}} \right ]
$$
I want to show that the only elements of the semigroup generated by $A$ and $B$ that have integer eigenvalues are elements of the form $A^n$ and $B^n$, $n \in \mathbb{N}$. I have tried every way that I can think of. Is it possible that a problem like this is undecidable?