I do know generally $\text{trace}(A^{-1}B)\not= \sum_i \lambda_{B_i}/\lambda_{A_i}$,
where $\lambda_{A_i}$ and $\lambda_{B_i}$ are the corresponding eigenvalues of matrix $A$ and $B$ respectively,
but is there any cases when this equality can be statified?
If $A$ and $B$ are simultaneously diagonalisable (or trigonalisable) and you are combining eigenvalues for the same (generalised) eigenvectors then this obviously holds. In other cases (i.e., almost always), all bets are off.