I am working from Elliott Mendelson's "Number Systems and the Foundations of Analysis," which I am thoroughly enjoying thus far.

The proof I am struggling with comes at the end of a section on order relations in the chapter on natural numbers:

By a greatest element of a set $B \subseteq P$ we mean an object $z$ such that $z\in B$ and $(\forall u)(u\in B \implies u \leq z)$.

If $\emptyset \neq A \subseteq P$ and $A$ is bounded above (that is, $(\exists w)(\forall u)(u \in A \implies u \leq w)$), then $A$ has a greatest element. (*Hint:* Let $B = \{w: (\forall u)(u\in A \implies u \leq w)\}$. By hypothesis, $B \neq \emptyset$. Apply the least number principle.)

The hint basically prescribes how to satisfy the requirement of a greatest element possessing the property that there exists some $z$ such that $(\forall u)(u\in A \implies u \leq z)$. In particular, define $B$ as given in the hint; since $A$ is bounded above, $B$ is non-empty. Since $B$ is, in turn, non-empty, it possesses a least element by the least number principle. This least element of $B$ is clearly the "$z$" referred to above, i.e., the greatest element of $A$. I have been struggling for quite a while with demonstrating that this "$z$" is, indeed, contained in $A$. I have attempted the method of proof by contradiction considering the alternative case that $z \notin A$, but can't seem to figure a means to arrive at a contradiction. I've also considered induction proofs as a means of reaching a contradiction, but likewise can't reach any contradictions. Can anyone provide an extra tip or approach to explore, please?