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 = f^{-1} \left({y}\right)$.

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

Then $y = f \left({x}\right)$ and so:

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

Also:

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