Let us add $p$ additional papaya trees.
Total number of papayas will be given by,
$f(p) = 50\times 600 + p\times 600-(50+p)\times 5\times p \\ \qquad = 30000 + (600-250)p - 5p^2 \\ \qquad = 30000 + 350p - 5p^2$
To find maxima, differentiate $f(p)$ w.r.t $p$.
${f}'(p) = 350 – 10p = 0 \\ \quad \implies 10p = 350 \implies p = 35$
Therefore, we need to add 35 extra trees to maximize the total production of papayas.