Here is an exam problem with the work shown:
A man and a woman agree to meet at a certain location at about 12:30 pm. The man will arrive at a time uniformly distributed between 12:15 and 12:45, and the woman will arrive at a time uniformly distributed between 12:00 and 1:00. Find the probability that the first to arrive has to wait no longer than 10 minutes.
Solution: Let $X$ be the time man arrives and $Y$ the time the woman arrives. We may assume that $X$ is uniform on $(15,45)$ and $Y$ uniform on $(0,60)$. We know that $X$ and $Y$ are independent. By drawing a picture and calculating the areas of appropriate regions we can conclude that the desired probability is $\frac23$.
Alternatively, by using that the joint density of $X$ and $Y$ is $\frac13\times\frac1{60}=\frac1{1800}$, we can compute $$\begin{align}\mathbb P(|X-Y|\le10)&=\color{blue}{\mathbb P(-10\le Y-X\le10)=\int_{15}^{45}\int_{x-10}^{x+10}}\frac1{1800}\,\mathrm dy\,\mathrm dx\\&=\frac1{1800}\int_{15}^{45}20=\frac1{1800}20\times30=\frac13\end{align}$$
I am extremely confused by the step that I circled. How did it change to $Y-X$, not $X-Y$?
This is my work:
Let $x$ denote the time at which the man arrives. Let $y$ denote the time at which the woman arrives.
$$x-y\le10,y-x\le10\to|x-y|\le10$$
$$\begin{align} \mathbb P(|X-Y|\le10)&=\mathbb P(-10\le Y-X\le10)\\ &=\int_0^{60}\int_{y-10}^{y+10}\left(\frac1{30}\right)\left(\frac1{60}\right)\,\mathrm dx\,\mathrm dy\\ &=\int_0^{60}\left(\left[\frac1{1800}x\right]_{x=(y+10)}-\left[\frac1{1800}x\right]_{x=(y-10)}\right)\,\mathrm dy\\ &=\int_0^{60}\left[\frac{y+10}{1800}-\frac{y-10}{1800}\right]\,\mathrm dy\\ &=\int_0^{60}\left[\frac{20}{1800}\right]\,\mathrm dy\\ &=\frac1{90}\int_0^{60}1\,\mathrm dy\\ &=\frac{60}{90}\\ &=\frac23 \end{align}$$
I get $\frac23$, the professor gets $\frac13$ (but also says above it is $\frac13$?)