The rectangle area is 2(1)=2 square units.
The area of the inner triangle to the right of the rectangle is
The area of the inner triangle above the rectangle is
Then, writing y as a function of x....
from the slope of the line.
If you use that relationship to write y in terms of x,
then you can write the triangle area in terms of x only, without y.
Of course, then you can ignore the partitioning of the triangle!