This title turns out to give an enormously rich problem.
To do and explore:
You can use the double click menu to see an animation of the construction steps.
Let's start with just the triangle and the rectangle in the image. You can drag the point t to along the side BC. You can see that the rectangle area varies.
We can measure the area of the triangle and the rectangle as well as the length of the base of the rectangle. It seems, as if the area of the largest possible rectangle is half of the triangle.
We can offset the rectangle area on the y-axis and the rectangle base on the x-axis. That way we can create the graph of the rectangle area as function of the rectangle base. By measuring the equation of this curve, we can see that it is a second-degree polynomial. Interesting is that we can drag the point C sideways, which will not affect the curve or its equation at all. The function is not depending on shape, but rather on size. (Well, keeping size and varying base and height will affect the shape of the curve, but not its maximum point.)
Note, that we use the point t to trace the curve, not an x. This is one way to introduce the concept of a parameter as a help variable. When I change t, x and y will be changed.
Finally we can use the image to actually prove that the maximum rectangle is exactly half the triangle. We simply reflect A, B and C in the rectangle. When t is half way between B and C the pieces of the triangle will perfectly cover the rectangle. In all other cases the rectangle is too small.