If the ratio of AE:EC is x:1, then similar triangles tell us that the ratio of FE:EG is also x:1. Likewise, the ratio of AF:GC is also x:1.
The diagonal AC, the vertical side BC=FG, and the horizontal side DC=AB can be divided into
x+1x and
x+11 proportional parts.
Let the rectangle's vertical side BC=FG be
l. Since the rectangle's area is 1, then the horizontal side DC=AB must be
l1
Break the vertical and horizontal sides down into their proportional parts:
AF must be
x+1x⋅l1
GC must be
x+11⋅l1
FE must be
x+1x⋅l
EG must be
x+11⋅l
Now you have the perpendicular legs of both shaded triangles. Add up their areas. The
l's cancel, and you're left with an expression in
x