I'm looking at Hrbacek and Jech Ex. 7.1.6.
$h(A)$ is the Hartog's number of $A$.
$h^*(A)$ is defined as the least ordinal $a$ such that there exists no surjection $f \colon B \to a$ with $B$ a subset of $A$.
I think I have a proof by showing that $h(A) \lt h^*(A)$ and $h^*(A) \lt h(A)$ lead to contradictions. As ordinals are totally ordered, this implies $h^*(A) = h(A)$.
For example, if we assume $h(A) \lt h^*(A)$ then we get that $h(A)$ is an ordinal a such that there is no injection $f \colon a \to A$, but there is a function $g$ with $dom(g) \subset A$ and $im(g) = a$. We can then form an injection $g'$ from $g$ (if $g$ isn't already injective) and the inverse yields an injection $g\colon a \to A$, a contradiction.
Similar reasoning is used to show the other inequality leads to a contradiction. The problem is that I haven't at all used the hypothesis that $A$ can be well-ordered. A previous part of the question asks you to prove that $h(A)\leq h^*(A)$ for any set $A$, so I'm assuming there is a problem with the $h(A) \lt h^*(A)$ part of the proof.
Note that this is prior to introducing the axiom of choice. If I'm not mistaken with the axiom of choice there would be no need to make the well-orderability of $A$ explicit, but even then, I never use the fact that every well order is isomorphic to an ordinal, hence my confusion.
The key point is that if $A$ can be well-ordered, then by fixing a well-order on $A$, every surjection $f\colon A\to X$ has an obvious injective inverse definable from the well-order we fixed before.
(And of course, even without choice and any other assumptions, if there is $g\colon X\to A$ injective, for $X\neq\varnothing$, then there is a surjective $f\colon A\to X$.)