Here's a proof (with a slight modification of **Lemma (A)**):

If \\(s : X \rightarrow A\\) has a left inverse \\(r\\), then \\(s(x) = s(y) \implies rs(x) = rs(y) \implies x = y\\), so \\(s\\) is injective.

If \\(r : A \rightarrow X\\) has a right inverse \\(s\\), then for any \\(x \in X\\) we have \\(r(s(x)) = rs(x) = x\\), so \\(r\\) is surjective.

The converses are slightly tricksier.

If \\(s : X \rightarrow A\\) is injective, and \\(a \in A\\) is in the image of \\(s\\), we can define \\(r(a)\\) to be the unique \\(X\\)-element sent to \\(a\\). If \\(a\\) is _not_ in the image of \\(s\\), we can define it to be whatever we like – but we must define it to be something, so \\(X\\) cannot be empty. If \\(X\\) is empty then we need \\(A\\) empty too in order to get a left inverse.

in summary: an injection \\(s : X \rightarrow A\\) always has a left inverse _unless_ \\(X\\) is empty and \\(A\\) is non-empty.

If \\(r : A \rightarrow X\\) is surjective, then for each \\(x \in X\\) we can associate a non-empty set \\(A_x\\) of \\(A\\)-elements sent to \\(x\\). If we can pick one element from each \\(A_x\\), we can build a right inverse – but this requires (and for that matter implies) the Axiom of Choice.

in summary: a surjection \\(r : A \rightarrow X\\) always has a right inverse _providing_ we accept the Axiom of Choice.