Let $ f : X \rightarrow Y$ and $g : Y \rightarrow Z$ be invertible functions. Prove that $g \circ f : X \rightarrow Z$ is invertible and that $(g \circ f ) ^{-1} = f^{-1} \circ g^{-1} $
Would this suffice as a proof?
$$\begin{align} (g \circ f) \circ (f^{-1} \circ g^{-1}) &= g \circ ((f \circ f^{-1}) \circ g^{-1})\\ &= g \circ (I_Y \circ g^{-1})\\ &= g \circ g^{-1}\\ &= I_X\\ (f^{-1} \circ g^{-1}) \circ (g \circ f) &= (f^{-1} \circ (g^{-1} \circ g)) \circ f\\ &= (f^{-1} \circ I_Y) \circ f\\ &= f^{-1} \circ f\\ &= I_Z \end{align}$$
I would accept this as a proof on an undergraduate homework assignment.
The only comment I would make is that it needs some English sentences to provide context to what you're doing and why.
Try opening with
before moving on with
and then
and then a statement with your conclusion.
Generally blocks of mathematics should be delimited with English statements. You have two main mathematical "thoughts" in what you wrote, so need to wrap them both, as well as the unspoken "thought" about using/examining $f^{-1} \circ g^{-1}$ in the first place.