Solution (source code)

= Solution

\b[True.] Take $C=f(A)$ and define $g(f(a))=a$, which is well-defined and injective because $f$ is injective.