Not quite. You need to add the 3(x-3), not multiply by it (but that was probably just a typo). So C(x) = x^2+5x+7+3(x-3).

so the cost function is C(x) = x² + 5x + 7 if below 3 tons, but (x² + 5x + 7)3(x - 3) if above 3 tons?

The profit function will be in terms of the number of tons sold. What are the possible values of tons sold?a) What is the domain of the profit function?

Just use Profit=Income-Costb) Write the profit function for a production level below 3 tons.

c) Write the profit function for a production level above 3 tons.

The easiest way to do this is probably just checking any stationary points and end points.d) What level of output maximmizes profits? Justify your answer.