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 [imath]\displaystyle\frac{x}{x+1}[/imath] and [imath]\displaystyle\frac{1}{x+1}[/imath] proportional parts.
Let the rectangle's vertical side BC=FG be [imath]l[/imath]. Since the rectangle's area is 1, then the horizontal side DC=AB must be [imath]\displaystyle\frac{1}{l}[/imath]
Break the vertical and horizontal sides down into their proportional parts:
AF must be [imath]\displaystyle\frac{x}{x+1}\cdot\frac{1}{l}[/imath]
GC must be [imath]\displaystyle\frac{1}{x+1}\cdot\frac{1}{l}[/imath]
FE must be [imath]\displaystyle\frac{x}{x+1}\cdot l[/imath]
EG must be [imath]\displaystyle\frac{1}{x+1}\cdot l[/imath]
Now you have the perpendicular legs of both shaded triangles. Add up their areas. The [imath]l[/imath]'s cancel, and you're left with an expression in [imath]x[/imath]