Here is an alternative proof for this result, following Exercises 6.2.8-9 of Hoffman & Kunze's Linear Algebra (p. 190):
Lemma: Let $A,B\in M_n(\mathbb{F})$, where $\mathbb{F}$ is an arbitrary field. If $I-AB$ is invertible, then so is $I-BA$, and
$$(I-BA)^{-1}=I+B(I-AB)^{-1}A.$$
Proof of Lemma: Since $I-AB$ is invertible,
\begin{align}
&I=(I-AB)(I-AB)^{-1}=(I-AB)^{-1}-AB(I-AB)^{-1}\\
&\implies (I-AB)^{-1} = I+ AB(I-AB)^{-1}.
\end{align}
Then we have
\begin{align}
I+B(I-AB)^{-1}A&= I+B[I+ AB(I-AB)^{-1}]A= I+BA+BAB(I-AB)^{-1}A\\
\implies I&=I+B(I-AB)^{-1}A-BA-BAB(I-AB)^{-1}A\\
&=I[I+B(I-AB)^{-1}A]-BA[I+B(I-AB)^{-1}A]\\
&=(I-BA)[I+B(I-AB)^{-1}A].\checkmark.
\end{align}
Proposition: $\forall A,B\in M_n(\mathbb{F}):$ $AB$ and $BA$ have the same eigenvalues.
Proof: Let $\alpha\in\mathbb{F}$ be an eigenvalue of $AB$. If $\alpha=0$, then $0=\det(0I-AB)=\det(-A)\det(B)=\det(B)\det(-A)=\det(0I-BA)$ and so $0$ is an eigenvalue of $BA$ also.
Otherwise $\alpha\neq0$. Suppose $\alpha$ is not an eigenvalue of $BA$. Then $0\neq\det(\alpha I-BA)=\alpha^n\det(I-(\frac{1}{\alpha}B)A)$. Then $0\neq\det(I-(\frac{1}{\alpha}B)A),$ so that $I-(\frac{1}{\alpha}B)A$ is invertible. By the lemma above we know that $I-A(\frac{1}{\alpha}B)$ is invertible as well, meaning $0\neq\det(I-A(\frac{1}{\alpha}B))=\det(I-\frac{1}{\alpha}AB) \implies 0\neq\det(\alpha I-AB)$. But we assumed $\alpha$ to be an eigenvalue for $AB$, $\unicode{x21af}$.