A) Profit is the difference between revenue an cost. The profit per widget is
m(x) = p(x) - c(x)
m(x) = 60x -3x^2 -(1800 - 183x)
m(x) = -3x^2 +243x -1800
Then the profit function for the company will be the excess of this per-widget profit multiplied by the number of widgets over the fixed costs.
P(x) = x×m(x) -50,000
P(x) = -3x^3 +243x^2 -1800x -50000
b) The marginal profit function is the derivative of the profit function.
P'(x) = -9x^2 +486x -1800
c) P'(40) = -9(40 -4)(40 -50) = 3240
Yes, more widgets should be built. The positive marginal profit indicates that building another widget will increase profit.
d) P'(50) = -9(50 -4)(50 -50) = 0
No, more widgets should not be built. The zero marginal profit indicates there is no profit to be made by building more widgets.
On the face of it, this problem seems fairly straightforward, and the above "step-by-step" seems to give fairly reasonable answers. However, if you look at the function p(x), you find the "best price per widget" is negatve for more than 20 widgets. Similarly, the "cost per widget" is negative for more than 9.8 widgets. Thus, the only reason there is any profit at all for any number of widgets is that the negative costs are more negative than the negative revenue. This does not begin to model any real application of these ideas. It is yet another instance of failed math curriculum material.