Find the Largest Area of Square Inside Two Rectangles | Leetcode #3047