Let $A$ and $B$ be nonempty sets and let $f : A \to B$. Prove that the following statements are equivalent: $\text{(i) }$ $f$ is surjective. $\text{(ii)} $ For every set $C$ and and every functions $g, h : B \to C$, if $g\circ f = h \circ f$ then $g = h$.
Problem
Source: 2014 Thailand October Camp Functional Equations Quiz p1
Tags: algebra, functional equation