the marginal profit is
maximal profit occurs either at the point where marginal profit = 0, or x=0, or x=30.
Find the profit at each of these points and see which one is higher
hintThere is no point in the range 0 < x < 30 where marginal profit =0 in this case.
this is equal to P(x), where x is the production level you found in part b
if your existing answer is in the range 0 < x< 10, then it will not change.
However if your existing answer is not in the range, you need to find a new one, which will be either:
or somewhere in between where the marginal profit is zero (you can discount this possibility as if there was a point in the range with marginal profit =0, you would have found it in part b)