This question is from Spivak,
19 If A is a bounded infinite set prove
c) If $\limsup A < \sup A$, then A contains a largest element.
d) The analogues for $\liminf A$.
What I did
I was able to do the previous items where one shows that $\liminf A \leq \limsup A$ and $\limsup A \leq \sup A$, but I was not able to go any further. I also know that if the equality doesn't hold, then $\sup A> \inf B$ where B is the set of all almost upper bounds.
Suppose $B$ is the set of almost upper bounds on $A$, and suppose $$\inf B < \sup A.$$ Then, there must exist some $b \in B$ such that $$\inf B \le b < \sup A,$$ as otherwise $\sup A$ would be a lower bound for $B$, which would contradict the above statement.
Since $b \in B$, it follows that $A \cap [b, \infty)$ is finite, and hence has a maximum element $a$. I claim that $a$ is the maximum of $A$. Suppose this is not the case. Then some $a^* > a$ exists in $A$, and since $a \ge b$, we therefore have $a^* \ge b$. Therefore $a^* \in A \cap [b, \infty)$, which contradicts $a$ being the maximum on $A \cap [b, \infty)$. By contradiction, $a$ is the maximum of $A$.