It seems to me that:
$$\int_0^\infty \int_0^\infty |x-y|e^{-x}e^{-y} \, dx \,dy$$
$$ = \int_0^\infty e^{-y} \left( \int_y^\infty (x-y)e^{-x} \, dx + \int_0^y (y-x)e^{-x} \, dx \right) \,dy $$
But in the book solution below it just doubles the integral that goes from $y$ to infinity. Specifically I'm having problems understanding why
$$2 \int_y^\infty (x-y)e^{-x} \, dx = \int_y^\infty (x-y)e^{-x} \, dx + \int_0^y (y-x)e^{-x} \, dx $$
From the book solution the LHS $=2e^{-y}$
and I think the RHS $= 2e^{-y} + y - 1$
In the end they both give the same answer after integrating with respect to $y$ from zero to infinity.
Can you explain the reasoning why you can double the integral? I'm thinking there is symmetry but I'm having trouble seeing it. Thanks for your help and patience.
Book solution

Note that
$$\tag{*} \int_0^\infty\int_0^\infty |x-y|e^{-x}e^{-y} \, dx\, dy \\ = \int_0^\infty\int_y^\infty (x-y)e^{-x}e^{-y} \, dx\, dy + \int_0^\infty\int_0^y (y-x)e^{-x}e^{-y} \, dx\, dy$$
The second integral on the RHS of (*) can be written using the indicator function as
$$\int_0^\infty\int_0^y (y-x)e^{-x}e^{-y} \, dx\, dy = \int_0^\infty\int_0^\infty (y-x)e^{-x}e^{-y}\mathbf{1}_{\{x \leqslant y\}}(x,y) \, dx\, dy $$
Note that $\mathbf{1}_{\{x \leqslant y\}}(x,y) = 1 $ if $x \leqslant y$ and $\mathbf{1}_{\{x \leqslant y\}}(x,y) = 0 $ if $x > y$.
Applying Fubini's theorem (integrand is absolutely integrable) we get
$$\int_0^\infty\int_0^y (y-x)e^{-x}e^{-y} \, dx\, dy = \int_0^\infty\int_0^\infty (y-x)e^{-x}e^{-y}\mathbf{1}_{\{x \leqslant y\}}(x,y) \, dy\, dx\\ = \int_0^\infty\int_x^\infty (y-x)e^{-x}e^{-y}\, dy\, dx $$
Now switch variable names and this is identical to the first integral on the RHS of (*).
Hence,
$$ \int_0^\infty\int_0^\infty |x-y|e^{-x}e^{-y} \, dx\, dy = 2\int_0^\infty\int_y^\infty (x-y)e^{-x}e^{-y} \, dx\, dy $$