(1) Start, for fun, with a silly proof for square matrices:
If $A$ is invertible, then
$$
\det(I+AB)=\det A^{-1}\cdot\det(I+AB)\cdot\det A=\det(A^{-1}\cdot(I+AB)\cdot A)=\det(I+BA).
$$ Now, in general, both $\det(I+AB)$ and $\det(I+BA)$ are continuous functions of $A$, and equal on the dense set where $A$ is invertible, so they are everywhere equal.
(1) Now, more seriously:
$$
\det\begin{pmatrix}I&-B\\\\A&I\end{pmatrix}
\det\begin{pmatrix}I&B\\\\0&I\end{pmatrix}
=\det\begin{pmatrix}I&-B\\\\A&I\end{pmatrix}\begin{pmatrix}I&B\\\\0&I\end{pmatrix}
=\det\begin{pmatrix}I&0\\\\A&AB+I\end{pmatrix}
=\det(I+AB)
$$
and
$$
\det\begin{pmatrix}I&B\\\\0&I\end{pmatrix}
\det\begin{pmatrix}I&-B\\\\A&I\end{pmatrix}
=\det\begin{pmatrix}I&B\\\\0&I\end{pmatrix}
\begin{pmatrix}I&-B\\\\A&I\end{pmatrix}
=\det\begin{pmatrix}I+BA&0\\\\A&I\end{pmatrix}
=\det(I+BA)
$$
Since the leftmost members of these two equalities are equal, we get the equality you want.