First method:
Let point H be such that EDHF and ABGH are rectangles. Denote their areas by P1 and P2, respectively, and the area of rectangle CEFG by P3.
We have
P1=x⋅y,P2=3x⋅x,P3=2x⋅y
From the condition, we know that P1+P2=P3, which leads to the equation: x⋅y+3x⋅x=2x⋅y.
On the left side, apply the distributive property of multiplication over addition, and then divide both sides of the equation by x (which is permissible since the length x is not 0):
x⋅(y+3x)=2x⋅y
y+3x=2y,i.e. we get y=3x.