Wow, interesting question...
Ok, let the length of the vertical side of the rectangle be

units and the length of the horizontal side be

units.
To avoid confusion, label the triangle as

with A being the top of the triangle (according to the images provided, B being the left hand corner, and C being the right hand corner.
Let

.
Then

Label the four corners, starting from the top left hand corner going clockwise,


So

(AAA)
Hence

, so

So in

This

is a bit annoying...think you need to turn in into an expression in terms of

.
Not too sure how to do this, but one method is perhaps solving these three equations simultaneously:
} = \frac{BG}{\sin\left(\frac{\theta}{2}\right)} )
(found in

)...(1)
} = \frac{x}{\sin\theta} )
...(2)
 = 2 )
...(3)
When you find

, simply sub it into the expression for the area of the rectangle:
 )
and then differentiate it, let the derivative equal to 0, and then solve for x, solve for y, and hence get the area.
Hope this helps and I hope that it's not devastatingly wrong...as it appears to be..:p