I have shown that the minimal polynomials of $XY$ and $YX$ differ by at most a factor of $t$ for any square complex matrices $X$ and $Y$ and that their characteristic polynomials are equal. Using this, I argued as follows:

$AB$ diagonalisable so $(AB)^2$ diagonalisable so we can write down its minimal polynomial. $(BA)^2=B(ABA)$ so the minimal polynomial of $(BA)^2$ differs from the minimal polynomial of $(AB)^2$ by at most a factor of $t$. So if $t$ doesn't divide $m\_{AB}(t)$ then we're done since $m\_{(BA)^2}$ then a product of distinct linear factors.

I'm having trouble figuring out what to do if $t$ divides $m\_{AB}$, in other words if $AB$ has $0$ as an eigenvalue. If $m\_{(BA)^2}$ drops the factor of $t$ or is $m\_{(AB)^2}$ then we're done, but how can I show it doesn't gain a factor of $t$?