Let x and y be uniformly distributed independent random variables over [0,1]. What is the probability the distance between x and y is less than 1/2?
This can be a geometry problem, since the distributions are uniform.
You need $\displaystyle p(|x-y| < \frac{1}{2})$
For x > y, we have $\displaystyle x - y < \frac{1}{2}$ or $\displaystyle y > x - \frac{1}{2}$
This cuts off a corner.
You do x < y to cut off the other corner. You're almost done.