Solution
= Solution
For all but finitely many $s\in\mathbb C$, the matrix $A-sI$ is invertible. Part (a), applied to $A-sI$ and $B$, then gives
$$
\det\!\left(tI-(A-sI)B\right)
=\det\!\left(tI-B(A-sI)\right).
$$
Both sides are <polynomials> in the two variables $s,t$. Since they agree for infinitely many values of $s$, their coefficients as polynomials in $s$ agree. Setting $s=0$ yields
$$
\boxed{\det(tI-AB)=\det(tI-BA)}
$$
even when $A$ is <singular matrix>[singular].