Hello there. To solve this question, we'll have to remember some properties about maximizing volumes of boxes.
Let's start by drawing the situation:
In the left, we have the cardboard piece that was 40 inches by 50 inches, then on the right we have it after cutting the square corners of measure x inches.
Now, we create a box by closing the walls:
The measures of the cardboard piece after having been cut the corners are 40 - 2x and 50 - 2x, while after in the box format, its height is equal to x.
Therefore, the total volume of the box is given by:

To maximize this function, we take its derivative and find the roots of the polynomial:

Taking its roots, we get:
![\begin{gathered} 12x^2-360x+2000=0 \\ \\ x=\frac{360\pm\sqrt[]{360^2-4\cdot12\cdot2000}}{2\cdot12}=\frac{360\pm40\sqrt[]{21}_{}}{24}=15\pm5\sqrt[]{(7)/(3)} \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/95nlam714pmu9eyk8pfsj4uvx7vtt7vdmk.png)
In this case, we got two values, but only one of them will maximize this function.
Taking the second derivative of the function, we get:

Plugging the values in, we get:
![\begin{gathered} 24\cdot\frac{360+40\sqrt[]{21}}{24}-360=40\sqrt[]{21} \\ \\ 24\cdot\frac{360-40\sqrt[]{21}}{24}-360=-40\sqrt[]{21} \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/ycqe8hl6ovphrpaencstar1lxpggh02z0o.png)
And the value such that f''(x) < 0 will be the value that gives us the maximum volume of the box.
Plugging it into the expression for the volume, we finally get:
![\begin{gathered} 4\cdot\mleft(15-5\sqrt[]{(7)/(3)}\mright)^3-180\cdot\mleft(15-5\sqrt[]{(7)/(3)}\mright)^2+2000\cdot\mleft(15-5\sqrt[]{(7)/(3)}\mright) \\ \\ \\ 3000+\frac{7000\sqrt[]{21}}{9}=\text{Maximum volume} \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/8t90xy2huo48kni6v2xa0pgkb5sed23t7i.png)
This maximum volume is approximately equal to 6564 cubic inches.