The profit function P(x) is the revenue function R(x) minus the cost function C(x). Thus:
[tex]\begin{gathered} P(x)=R(x)-C(x) \\ . \\ \begin{cases}R(x)={-0.5(x-90)^2}+4050 \\ C(x)={40x+150}\end{cases} \\ . \\ P(x)=-0.5(x-90)^2+4050-(40x+150) \end{gathered}[/tex]And solve:
[tex]P(x)=-0.5(x^2-180x+8100)+4050-40x-150=-0.5x^2+90x-4050-40x-150=-0.5x^2+50x-150[/tex]Thus, the profit function is:
[tex]P(x)=-0.5x^2+50x-150[/tex]