Hello, Mike!

Your wording is off . . . and your ratio is wrong . . .

A right triangle represents a lot: side a = 12m, side b = 4m.

Doug wants to put a rectangular fence in that uses side a and b,

and one corner touching side c of the triangle.

What are the dimensions that maximize the area of the **rectangle**? Code:

- *
: 4-y | *
: | *
: | *
4 *-----------*
: | x | *
: y | |y *
: | | *
- *-----------*-----------*
: x : 12-x :
: - - - - - 12- - - - - :

We have two similar right triangles.

. . Hence: .$\displaystyle \frac{4-y}{x} \:=\:\frac{y}{12-x} \quad\Rightarrow\quad y \:=\:4 - \frac{x}{3}\;\;{\color{blue}[1]}$

The area of the rectangle is: .$\displaystyle A \;=\;xy$

Substitute [1]: .$\displaystyle A \:=\:x\left(4-\frac{x}{3}\right) \quad\Rightarrow\quad A \:=\:4x-\frac{x^2}{3}$

. . Then: .$\displaystyle A' \:=\:4 - \frac{2x}{3} \:=\:0 \quad\Rightarrow\quad\boxed{ x \:=\:6}$

Substitute into [1]: .$\displaystyle y \:=\:4-\frac{6}{3} \quad\Rightarrow\quad\boxed{ y \:=\:2}$