Category theory, $(f\circ g)$ and $(g\circ f)$ are isomorphism, then ... 
Let $\mathcal{C}$ be a category $A,B\in\operatorname{Ob}(\mathcal{C})$ and $f:A\to B$ like $g: B\to A$ morphisms. If $f\circ g$ and $g\circ f$ are isomorphisms, then $f$ and $g$ are isomorphisms.

I somehow have a hard time proofing this result. Everything I try seems to fail.
We know that $f\circ g$ is an isomorphism, so there is an inverse $(f\circ g)^{-1}$.
Now to proof that $f$ is an isomorphism, I have to find $f^{-1}$.
I tried this:
We have $(f\circ g)\circ (f\circ g)^{-1}=\operatorname{id}_B$. With 
associativity, we write:
$f\circ (g\circ (f\circ g)^{-1})=\operatorname{id}_B$
Now my guess is that $f^{-1}=g\circ (f\circ g)^{-1}$, and I have to show that
$(g\circ (f\circ g)^{-1})\circ f=\operatorname{id}_A$
But I fail to do so, and I doubt that this approach can succeed.
Can you tell me, if this approach could work? Then I would like to try it again.
Else I appreciate a small hint. I would like to solve it mostly on my own.
Thanks in advance.
 A: You found a right inverse, yes. Now first search for an arbitrary left inverse. That can be done exactly the way you found the right inverse by using  $g \circ f$. In that way you can still use your approach.
Now try to show that in general right and left inverses coincide (you can show that similarly). If you are having trouble with that, I will help you. 
A: There is a more general fact: An monomorphism (epimorphism) which has section (retraction) is an isomorphism.
Indeed, if $f:a\rightarrow b$ is an monomorphism and $s:b\rightarrow a$ is such that $f\circ s=1_b$ then $$f\circ(s\circ f)=(f\circ s)\circ f=1_b\circ f=f=f\circ 1_a.$$ As $f$ is monomorphism it follows that $s\circ f=1_a$.
In your case $f$ is has a section and a retraction; in particular $f$ is a monomorphism (as it has a retraction) and has a section.
A: As ThorWittich suggested:
We want to find the inverse of $f$. 
Since $(f\circ g)\circ (f\circ g)^{-1}=\newcommand{\id}{\operatorname{id}}\id_B$, we have
$f\circ (g\circ (f\circ g)^{-1}=\id_B$ as a senseable choice of the inverse. 
Similar:
$(g\circ f)^{-1}\circ(g\circ f)=\id_A$
$((g\circ f)^{-1}\circ g)\circ f=\id_A$
Now we want to verify $(g\circ f)^{-1}\circ g\stackrel{?}{=}g\circ (f\circ g)^{-1}$.
We have: 
$g\circ (f\circ g)=(g\circ f)\circ g$
$\Leftrightarrow (g\circ f)^{-1}\circ g\circ (f\circ g)=g\circ (f\circ g)^{-1}\circ (f\circ g)$
$\Leftrightarrow (g\circ f)^{-1}\circ g\circ (f\circ g)=g\circ\id_B$
$\Leftrightarrow (g\circ f)^{-1}\circ g\circ \id_A= g\circ (f\circ g)^{-1}$
$\Leftrightarrow (g\circ f)^{-1}\circ g=g\circ (f\circ g)^{-1}$
We see that $g$ has an inverse similarly.
