Let A and B the randomly selected points on [0,1]. Assume B>A for beginning.
Triangular inequalities will reveal:
I am skipping several steps here but due to conditional probability that should be equivalent to:
We also have the symmetric case where A>B. So,
the answer = 2 * 1/8 = 1/4