Answer
See explanation
Work Step by Step
Multiply matrices on left side:
$\left[\begin{array}{lll}X & 0 & 0 \\ Y & 0 & I\end{array}\right] \cdot\left[\begin{array}{cc}A & Z \\ 0 & 0 \\ B & I\end{array}\right]=\left[\begin{array}{cc}X A & X Z \\ Y A+B & Y Z+I\end{array}\right]$
Now this matrix equals matrix on the right side:
$\left[\begin{array}{cc}X A & X Z \\ Y A+B & Y Z+I\end{array}\right]=\left[\begin{array}{ll}I & 0 \\ 0 & I\end{array}\right]$
$X A=I \rightarrow X=I \cdot A^{-1}=A^{-1}$
$Y A+B=0 \rightarrow Y A=-B \rightarrow Y=-B A^{-1}$
$X Z=0$
$Y Z+I=I$
$Y Z=0$
$Z=0,$ since $X$ and $Y$ are regular matrices they are inverses of some matrice $A$ and $B,$ so they have inverse themselves