Math Help - help pleaseeeeeeeee

Find the area of the largest rectangle that can be inscribed in a right triangle with legs of lengths 7 cm and 8 cm if two sides of the rectangle lie along the legs.

2. Hello, doneng!

Find the area of the largest rectangle that can be inscribed in a right triangle
with legs of lengths 7 cm and 8 cm if two sides of the rectangle lie along the legs.
Code:
      |
7 *
|  *
|     *
|        * P(x,y)
o - - - - - o
|           |  *
|          y|     *
|           |        *
- - o - - - - - o - - - - - * - -
|     x                 8

The equation of the hypotenuse is: . $y \:=\:-\tfrac{7}{8}x + 7$ .[1]

The area of the rectangle is: . $A \:=\:xy$ .[2]

Substitute [1] into [2]: . $A \:=\:x\left(-\tfrac{7}{8}x+7\right) \quad\Rightarrow\quad A \;=\;-\tfrac{7}{8}x^2 + 7x$

Differentiate and equate to zero: . $A' \;=\;-\tfrac{7}{4}t + 7 \:=\:0 \quad\Rightarrow\quad\boxed{ x \:=\:4}$

Substitute into [1]: . $y \;=\;-\tfrac{7}{8}(4) + 7 \quad\Rightarrow\quad\boxed{ y \:=\:\tfrac{7}{2}}$

Therefore, the maximum area is: . $A \;=\;xy \;=\;(4)\left(\tfrac{7}{2}\right) \;=\;\boxed{{\color{blue}14\text{ cm}^2}}$