This is a problem (10.11) from Munkres, Topology, 2 ed.
Problem: Let $A$ and $B$ be two sets. Using the well-ordering theorem, prove that either they have the same cardinality, or one has cardinality greater than the other.
Well-ordering theorem: If $A$ is a set, there exists an order relation on $A$ that is a well-ordering.
Two sets $A$ and $B$ are said to have the same cardinality if there is a bijection of $A$ with $B$. Let $A$ and $B$ be two nonempty sets. If there is an injection of $B$ into $A$, but no injection of $A$ into $B$, we say that $A$ has greater cardinality than $B$.
The hint to the problem makes reference to this theorem: Let $J$ and $C$ be well-ordered sets; assume that there is no surjective function mapping a section of $J$ onto $C$. Then there exists a unique function $h: J\to C$ satisfying the equation $$h(x)=\text{smallest}[C-h(S_x)].$$
I do not quite see the relationship between this last theorem to the problem at hand. The theorem implies that if there is no surjection of $A$ onto $B$ then there has to be an injection of $A$ into $B$. But how should I use it on the problem at hand? Thank you very much!