Answer
The inverse is, $\begin{align}
& {{\left( AB \right)}^{-1}}=\left[ \begin{matrix}
-23 & 16 \\
13 & -9 \\
\end{matrix} \right] \\
& {{A}^{-1}}{{B}^{-1}}=\left[ \begin{matrix}
-3 & 11 \\
8 & -29 \\
\end{matrix} \right] \\
& {{B}^{-1}}{{A}^{-1}}=\left[ \begin{matrix}
-23 & 16 \\
13 & -9 \\
\end{matrix} \right] \\
\end{align}$.
Work Step by Step
Consider the given matrix $ A=\left[ \begin{matrix}
2 & 1 \\
3 & 1 \\
\end{matrix} \right],B=\left[ \begin{matrix}
4 & 7 \\
1 & 2 \\
\end{matrix} \right]$.
$\begin{align}
& \left[ AB \right]=\left[ \begin{matrix}
2 & 1 \\
3 & 1 \\
\end{matrix} \right]\left[ \begin{matrix}
4 & 7 \\
1 & 2 \\
\end{matrix} \right] \\
& =\left[ \begin{matrix}
8+1 & 14+2 \\
12+1 & 21+2 \\
\end{matrix} \right] \\
& =\left[ \begin{matrix}
9 & 16 \\
13 & 23 \\
\end{matrix} \right]
\end{align}$
Now, the inverse of matrix $\left[ AB \right]$ is equal to $ A{{B}^{-1}}=\frac{1}{ad-bc}\left[ \begin{matrix}
d & -c \\
-d & a \\
\end{matrix} \right]$.
Now, we will compare the matrix to the original matrix, $\begin{align}
& a=9 \\
& b=16 \\
& c=13 \\
& d=23
\end{align}$
Now, the inverse is, ${{A}^{-1}}=\frac{1}{ad-bc}\left[ \begin{matrix}
d & -c \\
-b & a \\
\end{matrix} \right]$
Substitute the values to get, $\begin{align}
& {{A}^{-1}}=\frac{1}{ad-bc}\left[ \begin{matrix}
d & -c \\
-b & a \\
\end{matrix} \right] \\
& =\frac{1}{-1}\left[ \begin{matrix}
23 & -16 \\
-13 & 9 \\
\end{matrix} \right] \\
& =\left[ \begin{matrix}
-23 & 16 \\
13 & -9 \\
\end{matrix} \right]
\end{align}$
Therefore, the inverse of the matrix $\left[ AB \right]$ is $\left[ \begin{matrix}
-23 & 16 \\
13 & -9 \\
\end{matrix} \right]$.
Now, for the inverse of $ A $ and inverse of $ B $.
Then, consider the matrix, $ A=\left[ \begin{matrix}
2 & 1 \\
3 & 1 \\
\end{matrix} \right]$ And $ B=\left[ \begin{matrix}
4 & 7 \\
1 & 2 \\
\end{matrix} \right]$
Now, the inverse is, ${{A}^{-1}}=\frac{1}{ad-bc}\left[ \begin{matrix}
d & -c \\
-d & a \\
\end{matrix} \right]$
So compare the values to get,
$\begin{align}
& {{A}^{-1}}={{\left[ \begin{matrix}
2 & 1 \\
3 & 1 \\
\end{matrix} \right]}^{-1}} \\
& =\frac{1}{-1}\left[ \begin{matrix}
1 & -1 \\
-3 & 2 \\
\end{matrix} \right] \\
& =\left[ \begin{matrix}
-1 & 1 \\
3 & -2 \\
\end{matrix} \right]
\end{align}$
it can be further simplified as:
$\begin{align}
& {{B}^{-1}}=\frac{1}{1}\left[ \begin{matrix}
2 & -7 \\
-1 & 4 \\
\end{matrix} \right] \\
& =\left[ \begin{matrix}
2 & -7 \\
-1 & 4 \\
\end{matrix} \right]
\end{align}$
Then,
$\begin{align}
& {{A}^{-1}}{{B}^{-1}}=\left[ \begin{matrix}
-1 & 1 \\
3 & -2 \\
\end{matrix} \right]\left[ \begin{matrix}
2 & -7 \\
-1 & 4 \\
\end{matrix} \right] \\
& =\left[ \begin{matrix}
-23 & 16 \\
13 & -9 \\
\end{matrix} \right]
\end{align}$
Therefore, the inverse of $ A $ and inverse of $ B $ is $\left[ \begin{matrix}
-23 & 16 \\
13 & -9 \\
\end{matrix} \right]$.
So, ${{\left( AB \right)}^{-1}}={{B}^{-1}}{{A}^{-1}}$