Disclaimer: I'm not an expert, just want to try solving this problem.
Let $X_f$ be final segment of $X$ and $X_i = X \setminus X_f$, i.e. $X = X_i \sqcup X_f$.
Let $Y_i$ be initial segment of $Y$ and $Y_f = Y \setminus Y_i$, i.e. $Y = Y_i \sqcup Y_f$.
Let's construct a chain
$$
\cdots \rightarrow f^{-1}(g^{-1}(a)) \rightarrow g^{-1}(a) \rightarrow a \rightarrow f(a) \rightarrow g(f(a)) \rightarrow \cdots
$$
This sequence may terminate on the left either in set $X$, or in set $Y$, or it may never terminate.
Thus we can split all elements into $X$-stoppers, $Y$-stoppers, and never-stoppers.
- We use $f$ as bijection for $X$-stoppers and never-stoppers, obviously we can compare any two of them because $f$ preserves order.
- We use $g$ as bijection for $Y$-stoppers, obviously we can compare any two of them because $g$ preserves order.
- We have to prove that $X$-stopper can be compared to $Y$-stopper.
Statement 1 All $X$-stopper chains originate in $X_i$.
Proof. Consider the last $f^{-1}$ in the chain above that yielded an element $x \in X$. By the definition of $X$-stopper there is no such $y \in Y$ that $g(y)=x$. But $Y$ is isomorphic to $X_f$, thus $x \notin X_f \rightarrow x \in X_i$.
Statement 2 All $Y$-stopper chains originate in $Y_f$.
Final Statement
All $X$-stoppers are smaller than $Y$-stoppers.
Proof
Consider two elements $x_X$ and $x_Y$ from $X$-stopper and $Y$-stopper chains.
Let me apply $f^{-1}$ and $g^{-1}$ until exhaustion.
Note that sign $<$ or $>$ between $x_X$ and $x_Y$ remains unchanged at every step since we are applying the same function to both elements simultaneously.
Suppose, the $X$-chain was the first one to exhaust, which means we can draw our chains as
$$
\begin{aligned}
&x'_X \xrightarrow[]{f} \dots \xrightarrow[]{g} x_X \xrightarrow[]{f} \dots \\
y''_Y \xrightarrow[]{g} \dots \xrightarrow[]{g} &x'_Y \xrightarrow[]{f} \dots \xrightarrow[]{g} x_Y \xrightarrow[]{f} \dots \\
\end{aligned}
$$
By the statement 1 $x'_X \in X_i$.
The other chain did not stop since it is a $Y$-chain, thus there exists $g^{-1}(x'_Y)$ and $x'_Y \in X_f$.
Thus $x'_X < x'_Y$ and as a result we get $x_X < x_Y$.
If we stop in $Y$, similar reasoning applies.