confused about a matrix problem 
question:
  $$A=\begin{bmatrix} 1&2 \\3&4\end{bmatrix} ,
B=\begin{bmatrix} k&2 \\3&9\end{bmatrix},
(AB)^5=A^5B^5$$
  what's the value of k?

I know I can let $AB=BA$, which is 
$$\begin{bmatrix}\ k+6&20\\3k+12&42\end{bmatrix}=\begin{bmatrix}\ k+6&2k+8\\30&42\end{bmatrix},$$
and I can get $k=6$. But I am not pretty sure that it's the only answer.  I want to know if there is any other answer or solution to this question.
 A: Suppose the ground field is real or complex. We are going to show that $B$ must share a common eigenvector with $A$. Note that $B$ must be nonsingular, otherwise $k=\frac23$ but $(AB)^5\ne A^5B^5$.
By Cayley-Hamilton theorem, $(AB)^5=pAB+qI$ and $B^5=rB+sI$ for some scalars $p,q,r,s$. Since $(AB)^5$ and $B^5$ are nonsingular, $(p,q),(r,s)\ne(0,0)$. The equation in question can be rewritten as $pAB+qI=A^5(rB+sI)$, or equivalently,
$$
(pA-rA^5)B = sA^5-qI.\tag{1}
$$
Since the two eigenvalues $\frac12(5\pm\sqrt{33})$ of $A$ have different magnitudes, the powers of $A$ cannot possibly be scalar matrices. It follows that both sides of $(1)$ are nonzero.
If $pA-rA^5$ is nonsingular, then $B=(pA-rA^5)^{-1}(sA^5-qI)$ commutes with $A$ and hence the two matrices share a common eigenvector.
If $pA-rA^5$ is singular, then both $pA-rA^5$ and $sA^5-qI$ are rank-one matrices. Let $pA-rA^5=xy^T$ for some nonzero vectors $x$ and $y$ and let $u,v$ be two eigenvectors of $A$ corresponding to the two different eigenvalues of $A$ respectively. Then $(1)$ implies that
$$
xy^TBu=au\ \text{ and }\ xy^TBv=bv\tag{2}
$$
for some scalars $a$ and $b$. As $xy^T=pA-rA^5$ is a polynomial in $A$, we also have
$$
xy^Tu=cu\ \text{ and }\ xy^Tv=dv\tag{3}
$$
for some scalars $c$ and $d$. Since $y\ne0$ and $u,v$ are linearly independent, $y^Tu$ and $y^Tv$ cannot be both zero. Assume that $y^Tu\ne0$. Then the first equation in $(3)$ implies that $c\ne0$ and $x$ is a nonzero scalar multiple of $u$. The second equation in $(3)$ thus implies that $d=0$ and $\operatorname{span}(v)=\ker(y^T)$. But then the second equation in $(2)$ implies that $b=y^TBv=0$, i.e. $Bv\in\ker(y^T)=\operatorname{span}(v)$. Hence $Bv$ is a scalar multiple of $v$.
In other words, $A$ and $B$ must share a common eigenvector. Since the two linearly independent eigenvectors of $A$ (up to scaling) are $(-3\pm\sqrt{33},\,6)^T$, we must have
$$
\pmatrix{k&2\\ 3&9}\pmatrix{x\\ 6}\propto\pmatrix{x\\ 6},
$$
for some $x\in\{-3+\sqrt{33},\ -3-\sqrt{33}\}$. Thus
$$
\frac{kx+12}{3x+54}=\frac{x}{6}.
$$
Since $x^2+6x=24$ when $x\in\{-3+\sqrt{33},\ -3-\sqrt{33}\}$, the above equation implies that
$$
k=\frac1x\left[\frac{x(3x+54)}{6}-12\right]
=\frac1x\left(\frac{x^2+18x}{2}-12\right)
=\frac1x\left(\frac{12x+24}{2}-12\right)
=6.
$$
Therefore the only possible solution is $k=6$, and it is indeed a solution because $B=A+5I$ in this case. The cases are different over other ground fields. E.g. over $GF(2)$ or $GF(3)$, every $k$ in the field is a solution.
