Suppose $X = [0,1]$ and we have two cumulative distribution functions $F$ and $G$ on $X$ of two random variables. I've just read the claim $$\int_0^1 |F^{-1}(x) - G^{-1}(x)|dx = \int_0^1|F(y) - G(y)|dy$$
where the only reason described is "by Fubini's theorem". This is insanity to me. I know that under the uniform Lebesgue measure on $[0,1]$, $F^{-1}(x)$ has law $F$ and similarly for $G$ so the left hand integral is the expected value of the absolute value of the difference between two random variables with cdfs $F$, $G$, but I have no clue how to relate this to the integral on the right hand side. Please help me if you can.
Intuitively it should be simple: it amounts to saying that the green areas below are equal in the two charts, as there is simply a reflection in the bottom-left to top-right diagonal to achieve the inverse of the cumulative distribution functions