Simplemente siga la pista... Primera nota de que, desde la $E(X\mid Y)=Y$ casi seguramente, para cada $c$, $$E(X-Y;Y\leqslant c)=E(E(X\mid Y)-Y;Y\leqslant c)=0,$$ and that, decomposing the event $[Y\leqslant c]$ into the disjoint union of the events $[X>c,Y\leqslant c]$ and $[X\leqslant c,Y\leqslant c]$, one has $$E(X-Y;Y\leqslant c)=U_c+E(X-Y;X\leqslant c,Y\leqslant c),$$ with $$U_c=E(X-Y;X>c,Y\leqslant c).$$ Since $U_c\geqslant0$, this shows that $$E(X-Y;X\leqslant c,Y\leqslant c)\leqslant 0.$$ Exchanging $X$ and $S$ and following the same steps, using the hypothesis that $E(Y\mid X)=X$ almost surely instead of $E(X\a mediados de Y)=Y$ almost surely, one gets $$E(Y-X;X\leqslant c,Y\leqslant c)\leqslant0,$$ that is $$E(Y-X;X\leqslant c,Y\leqslant c)=0,$$ which, coming back to the first decomposition of an expectation above, yields $U_c=0$, that is, $$E(X-Y;X>c\geqslant Y)=0.$$ This is the expectation of a nonnegative random variable hence $(X-Y)\mathbf 1_{X>c\geqslant Y}=0$ almost surely, which can only happen if the event $[X>c\geqslant Y]$ has probability zero. Now, $$[X>Y]=\bigcup_{c\in\mathbb Q}[X>c\geqslant Y],$$ hence all this proves that $P(X>Y)=0$. By symmetry, $P(Y>X)=0$ y ya está.