Inverse of $I+BA$ is $(I+BA)^{-1} = I-B(I+AB)^{-1}A$ 
Assume $I+AB$ is invertible, prove then that $I+BA$ is invertible and $(I+BA)^{-1} = I-B(I+AB)^{-1}A$. 

My work:
$(I+AB)(I+AB)^{-1} =  I$
$B(I+AB)(I+AB)^{-1} = B $
$(I+BA)B(I+AB)^{-1} = B$
$(I+BA)B(I+AB)^{-1}B^{-1} = I$
Thus $(I+BA)$ is invertible and $B(I+AB)^{-1}B^{-1}$ is its inverse. But I have no clue how to arrive to the given inverse formula. I feel like I'm missing something. Can anyone help?
 A: $$
\begin{equation}
\begin{split}
(I+BA)(I-B(I+AB)^{-1}A) &= I+ BA-B(I+AB)^{-1}A-BAB(I+AB)^{-1}A \\ &=I+B(I-(I+AB)^{-1}-AB(I+AB)^{-1})A \\ &= I+B(I-(I+AB)(I+AB)^{-1}) \\ &= I+B(I-I) \\ &= I
\end{split}
\end{equation}
$$
$$
\begin{equation}
\begin{split}
(I-B(I+AB)^{-1}A)(I+BA) &= I+ BA-B(I+AB)^{-1}A-B(I+AB)^{-1}ABA \\ 
&=I+B(I-(I+AB)^{-1}-(I+AB)^{-1}AB)A \\ 
&= I+B(I-(I+AB)^{-1}(I+AB)) \\ 
&= I+B(I-I) \\ &= I
\end{split}
\end{equation}
$$
A: Because $I+AB$ is invertible the matrix $I-B(I+AB)^{-1}A$ is well defined.
We can try this suggested inverse out and get:
\begin{align}
(I+BA)(I-B(I+AB)^{-1}A) 
&= (I+BA-(I+BA)B(I+AB)^{-1}A) \\
&= (I+ BA - B(I+AB)(I+AB)^{-1}A) \\
&= (I+BA-BA) \\
&= I 
\end{align}
So $I-B(I+AB)^{-1}A$ is a right inverse to $I+BA$.
Now we try from the left:
\begin{align}
(I-B(I+AB)^{-1}A)(I+BA) 
&= I+BA - B(I+AB)^{-1}A(I+BA) \\
&= I+BA - B(I+AB)^{-1}(I + AB)A \\
&= I+BA - BA \\
&= I
\end{align}
And it turns out to be a left inverse as well.
So $I-B(I+AB)^{-1}A$ is the inverse to $I+BA$ and $I+BA$ is invertible.
