[step:Verify that the selected pair is least in the lexicographic order]
Let $(a,b) \in S$ be arbitrary. Since $(a,b) \in S$, we have $a \in P$. Because $a_*$ is the least element of $P$, we have $a_* \leq_A a$.
If $a_* <_A a$, then by the definition of $\leq_{\mathrm{lex}}$,
\begin{align*}
(a_*,b_*) \leq_{\mathrm{lex}} (a,b).
\end{align*}
If instead $a_* = a$, then $b \in Q$, because $(a_*,b) = (a,b) \in S$. Since $b_*$ is the least element of $Q$, we have $b_* \leq_B b$, and therefore, again by the definition of $\leq_{\mathrm{lex}}$,
\begin{align*}
(a_*,b_*) \leq_{\mathrm{lex}} (a,b).
\end{align*}
Thus $(a_*,b_*) \leq_{\mathrm{lex}} (a,b)$ for every $(a,b) \in S$. Since $(a_*,b_*) \in S$, it is the least element of $S$ under $\leq_{\mathrm{lex}}$. Therefore every nonempty subset of $A \times B$ has a least element, so $(A \times B,\leq_{\mathrm{lex}})$ is well-ordered.
[/step]