A Graphical Treatment
The increase in costs (MC)would exceed the gain in revenue (MR) if output exceeds Q*.
Hence, profits are maximized when MR = MC.
Given output level Q*, the firm chooses P* on the demand curve because that is what consumers are willing to pay for Q*.
The market equilibrium is P*, Q*.