Given that |x-y|<1/2 we no that the square 0 to 1 in x and 0 to 1 in y are all possible (x,y). The restriction defines an area left when you take off the corner from (0,1/2) to (1/2,1) and the opposite corner from (1/2,0) to (1,1/2) This comes from solving the inequalities x - y < 1/2 for y <x and x-y > -1/2 for y >x (the equalities give you the two lines that cut off the corners. The area left in the center is 1 - 2(1/2(1/2 x 1/2))) = 3/4
Now the probability that x < 1/2 and 1/2 < y is also the same 1/8 area triangle (It completes the upper left quater of the square from the omitted values from the first condition)
The probability is the area of the second condition and allowed by the first condition divided by the central region allowed by the 1st condition or 1/8/(3/4) = 1/6