It's a Prove/Disprove question.
Given $\mathrm{E}(Y|X)=X$ and $\mathrm{E}(X|Y)=Y$ and both $\mathrm{E}(X^2)$ and $\mathrm{E}(Y^2)$ are finite, then $$P(X=Y)=1$$
If we somehow get $\mathrm{Var}(X-Y)=0$, the above statement could be true.
So, $\mathrm{Var}(X-Y)=\mathrm{Var}(X)+\mathrm{Var}(Y)-2\mathrm{Cov}(X,Y)$
$\qquad\qquad\qquad\quad=\mathrm{E}(X^2)-[\mathrm{E}(X)]^2+\mathrm{E}(Y^2)-[\mathrm{E}(Y)]^2-2\mathrm{E}(XY)+2\mathrm{E}(X)\mathrm{E}(Y)$
Now, $-[\mathrm{E}(X)]^2-[\mathrm{E}(Y)]^2+2\mathrm{E}(X)\mathrm{E}(Y)=0$, since $\mathrm{E}(X)=\mathrm{E}(Y)$.
So, $\mathrm{Var}(X-Y)=\mathrm{E}(X^2)+\mathrm{E}(Y^2)-2\mathrm{E}(XY)$ $-(*)$
The solution given directly says the statement $(*)$ equals zero and hence the result, but \begin{align} \mathrm{E}(X^2) &= \mathrm{E}(X\cdot X) = \mathrm{E}(X\mathrm{E}(Y|X)) \\ \mathrm{E}(Y^2) &= \mathrm{E}(Y\cdot Y)\, = \mathrm{E}(Y\mathrm{E}(X|Y)) \\ \mathrm{E}(X\cdot Y) &= \mathrm{E}(\mathrm{E}(Y|X)\mathrm{E}(X|Y)) \end{align} How are they canceling each other?