This proof is nothing new. It is a reformulation of Sylvester's determinant theorem as suggested in Fabian's comment.
Assume $x \ne 0$, we have
$$
\begin{bmatrix}I_n & B\\ A & xI_m\end{bmatrix}
\begin{bmatrix}I_n & -B\\ 0 & I_m\end{bmatrix} =
\begin{bmatrix}I_n & 0\\ A & xI_m - AB\end{bmatrix}$$
This implies
$$\det(xI_m - AB) =
\begin{vmatrix}I_n & 0\\ A & xI_m - AB\end{vmatrix}
=\begin{vmatrix}I_n & B\\ A & xI_m\end{vmatrix}\tag{*1}
$$
Notice
$$\begin{vmatrix}I_n & B\\ A & xI_m\end{vmatrix}
= (-)^{mn} \begin{vmatrix}A & xI_m\\I_n & B\end{vmatrix}
= \begin{vmatrix}xI_m & A\\B & I_n\end{vmatrix}
= x^{m+n}\begin{vmatrix}I_m & x^{-1}A\\x^{-1}B & x^{-1}I_n\end{vmatrix}
$$
Apply $(*1)$ with $x^{-1}B, x^{-1}A, x^{-1}I_n$ taking the roles of $A, B, xI_m$, we get
$$\begin{align}\det(xI_m-AB) &= x^{m+n}\det(x^{-1}I_n - x^{-2}BA) = x^{(m+n)-2n}\det(x I_n - BA)\\
&= x^{m-n}\det(xI_n - BA)\end{align}$$
This leave us with the special case $x = 0$,
- if $m = n$, the relation at hand reduces to $\det(-AB) = \det(-BA)$ which is trivially true.
- if $m > n$, LHS reduces to $\det(-AB)$ where $AB$ is a $m \times m$ matrix. Since the rank of $A$ and $B$ is at most $n < m$, this determinant is zero. RHS is zero because of the $x^{m-n}$ factor.
Combine all these, we have
$$\det(x I_m - AB ) = x^{m-n} \det(x I_n - BA)$$
unless $x = 0$ and $m < n$ where the RHS is an undefined expression.