To prove that $f$ and $g$ are mutually inverse bijections $A\to B$ and $B\to A$, it is necessary to prove:
- that really $f:A\to B$ and $g:B\to A$;
- for every $x_0\in A$ and $y=f(x_0)$ we have $x_1=x_0$ for $x_1=g(y)$;
- for every $y_0\in B$ and $x=g(y_0)$ we have $y_1=y_0$ for $y_1=f(x)$.
Now suppose we already know that $f$ is an injection. Knowing this which items of the above list may be skipped without breaking the proof that they are mutually inverse?
It's a bit easier if we rephrase your conditions thus:
If the third condition holds, and we put $f(a)$ for $b$, then we get: $$ f(g(f(a)) = f(a) $$ If also $f$ is an injection (so that $f(x) = f(y)$ implies $x = y$), then we can "cancel" the $f$ on the two sides of the above equation giving: $$ g(f(a)) = a $$ which is the second condition.
So if $f$ is an injection you don't need to check the second condition. (By a somewhat similar argument, if $g$ is a surjection, you don't need to check the third condition.)