I have managed to prove first part that f is bijection.
I'm stuck on proving that $g=h=f^{-1}$
I tried the set theoretic approach, trying to show that the $2$ functions $g$ and $f^{-1}$ are subsets of each other. Now I just need to show that $b=b'$ so that $(a,b)$ belongs to $f^{-1}$
Any help would be appreciated.
Let it be that $g\circ f=\mathsf{id}_A$ and $f\circ h=\mathsf{id}_B$.
Then: $$g=g\circ\mathsf{id}_B=g\circ(f\circ h)=(g\circ f)\circ h=\mathsf{id}_A\circ h=h$$
The first and fifth equalities are based on neutrality of identities.
The third equality is based on associativity of composition.