First of all we will understand the question!!
The question is saying that you are given a function and you have to find the value of x which will give the maximum profit... Lets solve it by finding the extrema using the vertex
[tex] \rm \: p(x) = - 5 {x}^{2} + 30x + 8[/tex]
[tex] \rm \: p(x) = { - 5x}^{2} + 30x + 8 \\ \rm \: a = - 5 \: and \: b \: = 30[/tex]
[tex] \rm \: x = \frac{30}{ 2 \times (- 5)} [/tex]
[tex] \rm \: x = 3[/tex]