Left and Right Inverses of Mapping are Inverse Mapping/Proof 1

Proof
From Left and Right Inverse Mappings Implies Bijection it follows that $f$ is a bijection.

It follows from Bijection Composite with Inverse that $g_1 = g_2 = f^{-1}$.