The function is given by:
[tex]P(x)=20x-8000[/tex]
(a) P(x) = 6000
so:
[tex]\begin{gathered} 6000=20x-8000 \\ solve_{\text{ }}for_{\text{ }}x\colon \\ 20x=6000+8000 \\ 20x=14000 \\ x=\frac{14000}{20} \\ x=700 \end{gathered}[/tex]
Producing and selling 700 hats will give a profit of $6000
-----------------------
(b)
P(x) ≥ 0
So:
[tex]\begin{gathered} 20x-8000\ge0 \\ solve_{\text{ }}for_{\text{ }}x\colon \\ 20x-8000\ge0 \\ 20x\ge8000 \\ x\ge\frac{8000}{20} \\ x\ge400 \end{gathered}[/tex]
To avoid a loss 400 hats must be produced and sold