Coffee Shop Meeting $A$ and $B$ decide to meet at a cafe between $5$ p.m. and $6$ p.m. They agree that the person who arrives first at the cafe would wait for exactly $15$ minutes for the other. If each of them arrives at a random time between $5$ p.m. and $6$ p.m., what is the probability that the meeting takes place?
I figured that if one of them arrive at the first minute then the probability of the two meeting each other would be $15/60$, because the second person could arrive from the $1^{st}$ minute till the $15^{th}$ minute and meet with him. Similarly if the first person arrives at the second minute the probability would be $16/60$. This will go on till the $14^{th}$ minute and the probability would be $29/60$. The probability will remain $29/60$ till the $45^{th}$ minute, after which it will gradually decrease in the order $28/60, 27/60,... , 15/60.$
I am not sure if my approach is correct. Also I am stuck after a point with my approach. Please explain elaborately how to solve such questions.

Let $X$ and $Y$ be the times in units of hours that $X$ and $Y$ arrive. I assume here that they are uniformly distributed on $[0,1]$ and independent. Then the meeting happens provided $|X-Y| \leq 1/4$. So the probability of the meeting is
$$\frac{\int_{|x-y| \leq 1/4,0 \leq x \leq 1,0 \leq y \leq 1} dx dy}{\int_{0 \leq x \leq 1,0 \leq y \leq 1} dx dy}.$$
That is, it is the area of the region in the plane where they meet divided by the area of the square (which is just $1$). This region is the square except for the two triangles which lie above $y=x+1/4$ and below $y=x-1/4$. These have height and width $3/4$, so their areas are each $9/32$, which add up to $9/16$. So the area of the region is $7/16$, which is also the probability of the meeting.
A similar argument can be done when you assume that $X$ and $Y$ have a discrete distribution instead (as you seem to be doing in the original question).
