Solution:
Let us set up a coordinate system with the origin at point M and the x-axis along the line AB. Let points X and Y have coordinates (a,b) and (c,d) respectively. Because AX=XM and BY=YM, the coordinates of points A and B are (2a,0) and (2c,0), and those of points K and L are (a+2c,2d) and (c+2a,2b), respectively. Point O has coordinates (a+c,e) for some e, from which we obtain O1(a,d−e) and O2(c,b−e). Therefore, points O1 and O2 are symmetric to points X and Y with respect to the line y=2b+d−e, so X, Y and O1, O2 are vertices of a (possibly degenerate) isosceles trapezoid, and therefore lie on a circle.