Answer
The numbers of trees that will be planted are $30$ to maximize the yield to $900$ bushels.
Work Step by Step
Let $n$ be the number of trees added to $1\text{ acre}$.
Let $Y\left( n \right)$ be the yield in bushels/acre.
So,
$\left( \text{Yield in bushels/acre} \right)=\left( \text{bushels/tree} \right)\times \left( \text{tree/acre} \right)$
Therefore,
$\begin{align}
& Y\left( n \right)=\left( 40-n \right)\cdot \left( 20+n \right) \\
& =800-20n+40n-{{n}^{2}} \\
& =-{{n}^{2}}+20n+800
\end{align}$
So, the $n$ value is the vertex, which can be given as:
$\begin{align}
& n=\frac{-b}{2a} \\
& =\frac{-20}{2\left( -1 \right)} \\
& =10
\end{align}$
When the value of $n=10$, the yield would be maximum:
$\begin{align}
& Y\left( 10 \right)=\left( 40-10 \right)\left( 20+10 \right) \\
& =30\cdot 30 \\
& =900
\end{align}$
Therefore, the numbers of trees that will be planted will $20+10=30$ to maximize the yield to $900$ bushels.