@Rachelee If it's O(1) to pop the max in the current stack, then it takes O(n) time to pop all of the numbers in the stack using popMax. Calling popMax until the stack is empty will result in sorted output.

If it also takes O(1) time to push numbers onto the stack, then pushing a list of numbers also takes O(n) time. This means that given an arbitrary list of numbers, you could push them all into the stack (O(n) time) and then popMax until the stack is empty (O(n) time) resulting an an overall runtime of O(n) to sort the numbers. Obviously this can't hold, so what Brendon was saying was that one of those operations must be at least log n time.