Hi I need help with this geometry calculus 1 problem. I’m in high school and this is a homework. thank you!

Analysis on Perimeter
The shape is made up of a semicircle and a rectangle.
The perimeter of a semicircle is calculated using the formula:
[tex]P_C=\pi r[/tex]From the image, the diameter of the rectangle is given to be x. Since we know that the diameter is twice the length of the radius, this means that:
[tex]r=\frac{d}{2}=\frac{x}{2}[/tex]Hence, the perimeter of the semicircle in terms of x becomes:
[tex]P_C=\frac{\pi}{2}x[/tex]The perimeter of a rectangle is given to be:
[tex]P_R=2l+2w[/tex]Already, we have the base length to be x, therefore:
[tex]w=x[/tex]Note, though, that the connecting sides between the semicircle and the rectangle are not included in the perimeter length given. Therefore, the perimeter of the rectangle will be:
[tex]\begin{gathered} P_R=2l+w \\ P_R=2l+x \end{gathered}[/tex]Since the perimeter is given to be 40 feet, then we have:
[tex]\begin{gathered} P_R+P_C=40 \\ \therefore \\ 2l+x+\frac{\pi}{2}x=40 \end{gathered}[/tex]We can get the length of the rectangle by making l the subject of the formula:
[tex]\begin{gathered} 2l=40-x-\frac{\pi}{2}x \\ \text{Dividing through by 2, we have:} \\ l=\frac{40}{2}-\frac{x}{2}-\frac{\pi}{2\times2}x \\ l=20-\frac{x}{2}-\frac{\pi}{4}x \end{gathered}[/tex]Combining to a single fraction, we have:
[tex]l=\frac{80-2x-\pi x}{4}[/tex]AREA OF THE WINDOW
The area of the window can be gotten by using the formula:
[tex]A=A_C+A_R[/tex]The area of a semicircle is gotten using the formula:
[tex]A_C=\frac{\pi r^2}{2}[/tex]Therefore, the area will be:
[tex]\begin{gathered} A_C=\frac{\pi(\frac{x}{2})^2}{2}=\frac{\pi x^2}{2\times4} \\ A_C=\frac{\pi x^2}{8} \end{gathered}[/tex]The area of the rectangle will be:
[tex]A_R=l\times w[/tex]Inputting our known values, we have:
[tex]\begin{gathered} A_R=\frac{80-2x-\pi x}{4}\times x \\ A_R=x(\frac{80-2x-\pi x}{4}) \end{gathered}[/tex]Therefore, the combined area will be:
[tex]A=\frac{\pi x^2}{8}+x(\frac{80-2x-\pi x}{4})[/tex]Combining the fraction, we have:
[tex]A=\frac{\pi x^2+2x(80-2x-\pi x)}{8}[/tex]Expanding the bracket, we have:
[tex]A=\frac{\pi x^2+160x-4x^2-2\pi x^2}{8}=\frac{160x-4x^2-\pi x^2}{8}[/tex]Therefore, the function of the area is:
[tex]A=\frac{160x-4x^2-\pi x^2}{8}[/tex]