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

Proof
From Left and Right Inverse Mappings Implies Bijection, we have that $f$ is a bijection.

Let $y \in T$ and let $x = \map {f^{-1} } y$.

Such an $x$ exists because $f$ is surjective, and unique within $S$ as $f$ is injective.

Then $y = \map f x$ and so:

So $f^{-1} = g_1$.

Also:

So $f^{-1} = g_2$.