Editorial
Need a hint? Checkout the editorial.
View Editorial
Editorial
Try to relate the area of the blue region with the side length of the smallest square. Then you have to decide what it's minimum length could be. And finally find the length of line $AB$.