Answer
The length and width are 12 feet by 8 feet
Work Step by Step
Let us assume $ l $ be the length and $ w $ be the width of the rectangle such that:
$\begin{align}
& 2l+2w=40\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left( \text{I} \right) \\
& lw=96\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left( \text{II} \right)
\end{align}$
Divide the equation (I) by $2$ and the value of $ l $ is,
$\begin{align}
& l+w=20 \\
& l=20-w\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left( \text{III} \right) \\
\end{align}$
Substitute the value of (I) in equation (II).
Then,
$\begin{align}
& \left( 20-w \right)w=96 \\
& 20w-{{w}^{2}}=96 \\
& {{w}^{2}}-20w+96=0
\end{align}$
Now, solve for $ w $.
Therefore,
$\begin{align}
& \left( {{w}^{2}}-12 \right)w-8w+96=0 \\
& \left( w-12 \right)\left( w-8 \right)=0 \\
& w=12,8
\end{align}$
Substitute the value of $ w=11,7$ into equation (III):
If $ w=12$ then,
$\begin{align}
& l=20-12 \\
& =8
\end{align}$
If $ w=8$ then,
$\begin{align}
& l=20-8 \\
& =12
\end{align}$
Thus, the dimensions of the rectangle are 12 feet by 8 feet.