Hint: Let $f$ and $g$ have two $2\times 2$ nonsingular matrices of coefficients associated to them. Compute the matrix associated to $f\circ g$, and compare with the matrix product of the original two matrices.
$$f=\frac{az+b}{cz+d}~\leftrightarrow~ A=\begin{pmatrix}a&b\\c&d\end{pmatrix};\quad g=\frac{\alpha z+\beta}{\gamma z+\delta}\leftrightarrow B=\begin{pmatrix}\alpha &\beta \\\gamma&\delta\end{pmatrix}; $$
$$f\circ g\leftrightarrow \begin{pmatrix}?&?\\?&?\end{pmatrix};\qquad AB=?. $$
If you know how to invert matrices, you should be able to explicitly invert these transformations.
(Alse see here.)
I suppose you also want to see more explicitly how this is linear-algebraic. Say we have
$$f(z)=\frac{az+b}{cz+d},\quad f^{-1}(z)=\frac{pz+q}{rz+s}.$$
Composing them together,
$$\begin{array}{c l}f\circ f^{-1} &=\frac{a\frac{pz+q}{rz+s}+b}{c\frac{pz+q}{rz+s}+d} \\ & =\frac{a(pz+q)+b(rz+s)}{c(pz+q)+d(rz+s)} \\ & = \frac{(ap+br)z+(aq+bs)}{(cp+dr)z+(cq+ds)} \\ & = \frac{1z+0}{0z+1}.\end{array}$$
Writing as a system,
$$\begin{cases}ap+br=1 \\ aq+bs=0 \\ cp+dr=0 \\ cq+ds=1. \end{cases}$$
In terms of matrices:
$$\begin{pmatrix}a&b\\c&d\end{pmatrix}\begin{pmatrix}p&q\\r&s\end{pmatrix}=\begin{pmatrix}1&0\\0&1\end{pmatrix}. $$
Of course scalar multiplication of these matrices does not affect the underlying functions, so set
$$\begin{pmatrix}p&q\\r&s\end{pmatrix}=\begin{pmatrix}d&-b\\-c&a\end{pmatrix}. $$