The revenue is given by the unit price * number of units.
Profit = Revenue - Cost = 200x - 500,000 - 80x - 0.003x^2 = 120x - 500,000 - 0.003x^2
For profit to be maximum dP/dx = 0
120 - 0.006x = 0
x = 120/0.006 = 20,000
Therefore, to maximize profit, the firm should produce 20,000 penicillin.