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.
For x > y, we have or
This cuts off a corner.
You do x < y to cut off the other corner. You're almost done.