I need some help with the conclusion of an exercise. I have to prove that if $(A,R), (B,S)$ are well orderings and $f,g: (A,R) \rightarrow (B,S)$ are order-isomorphisms, then $f=g$.
Suppose that $f\neq g$. Then let $X$ be the set of elements $a\in A$ such that $f(a)\neq g(a)$. $X$ is not empty, so it has minimal element, $\overline a$. We have that $f(\overline a)\neq g(\overline a)$, thus in $B$ we have only two possibilities:
$1)$ $f(\overline a)>g(\overline a)$
$2)$ $f(\overline a)< g(\overline a)$.
I would like to see that these two cases are not possible, but I cannot find contradiction.
In case 1), think about what should be $f^{-1}(g(\bar a))$