I threw the kitchen sink at it. Please inform of any mistakes.
Step 1: Consider the triangle in a convenient coordinate system.

Step 2: Find the area of the triangle.
It's one half the base width multiplied by the height.
$$\frac{1}{2}ac$$
Step 3: Find an equation for the line passing through points (0,0) and (b,c) in slope-intercept form.
I won't go into the details unless someone asks me to. It's:
$$y=\frac{c}{b}x$$
Step 4: Find an equation for the line passing through points (b,c) and (a,0) in slope-intercept form
The slope of that line is:
$$\frac{-c}{a-b}$$
So the equation will be (i is the x intercept... I'm already using b...):
$$y=\frac{-c}{a-b}x+i$$
To find i, plug in the point (b,c):
$$c=\frac{-c}{a-b}b+i$$
$$i=\frac{c}{a-b}b+c$$
$$y=\frac{-c}{a-b}x+\frac{c}{a-b}b+c$$
$$y=\frac{cb-cx}{a-b}+c$$
Step 5: Find a relationship between x1 and x2.
Looking at the diagram, notice that the top left corner of the square is on the line addressed in step 3, and the top right corner of the square is on the line addressed in step 4. Moreover, their Y coordinates are the same (a consequence of how we chose our coordinate system). Given this, we should be able to find a relationship between x1 and x2 by setting their line equations to be equal.
$$\frac{c}{b}x_1=\frac{cb-cx_2}{a-b}+c$$
$$\frac{c}{b}x_1-c=\frac{cb-cx_2}{a-b}$$
$$\frac{cx_1(a-b)}{b}-c(a-b)=cb-cx_2$$
$$-\frac{cx_1(a-b)}{b}+c(a-b)=-cb+cx_2$$
$$-\frac{cx_1(a-b)}{b}+c(a-b)+cb=cx_2$$
$$-\frac{x_1(a-b)}{b}+(a-b)+b=x_2$$
$$-\frac{x_1(a-b)}{b}+a=x_2$$
$$x_2=-\frac{x_1(a-b)}{b}+a$$
Step 6: Find the area of the rectangle.
The area of the rectangle is the base times the height. The base is x2 - x1, the height can be found by plugging x1 into the equation in step 3. Since we have a relationship between x1 and x2, we can find the rectangle's size now as a function of x1 and only x1.
Height:
$$\frac{cx_1}{b}$$
Base:
$$-\frac{x_1(a-b)}{b}+a - x_1$$
Put them together as base * height:
$$area=(-\frac{x_1(a-b)}{b}+a - x_1)\frac{cx_1}{b}$$
Step 7: Find the maximum of the area function between x = 0 and x = a.
Let's just use WolframAlpha
Who kindly tells us that the maximum is:
$$\frac{1}{4}ac$$
If you look back at step 1, you will see that that's half the area of the triangle.