Demand for the product
$r = qp\\\ q = 12000 - 20 p\\\ r = 12000 p - 20 p^2\\\ \frac {dr}{dp} = 12000 - 40 p$
or
$p = 600 - \frac {q}{20}\\\ r = 600 q - \frac {q^2}{20}\\\ \frac {dr}{dq} = 600 - \frac {q}{10}$
On the costs side
$c = 500,000 + wE\\\ E = \frac {q}{100}\\\ c = 100,000 + \frac {wq}{100}\\\ \frac {dc}{dq} = \frac {w}{100}$
Profits are maximized when marginal revenue equals marginal costs.
$600 - \frac{q}{10} = \frac {w}{100}\\\ 6000 - \frac {w}{10} = q\\\ q = 100e\\\ e = 60 - \frac {w}{1000}\\\ $