Let $A$ and $ B$ be two nonsingular matrices. Show that $AB^{-1}$ and $B^{-1}A$ have the same eigenvalues
My attempt: $$ \begin{align} f(\lambda) &= | I\lambda -AB^{-1}| \\ &= |(I\frac{1}{\lambda}-B^{-1}A)^{-1}| \\ &= \dfrac{1}{|I\frac{1}{\lambda}-B^{-1}A|} \\ \end{align} $$
Not sure how to complete the final step. Any help would be appreciated