TeX source:
\begin{aligned} \text { average profit } &=\frac{\text { profit }}{\text { quantity produced }} \\ &=\frac{\text { total revenue }-\text { total cost }}{\text { quantity produced }} \\ &=\frac{\text { total revenue }}{\text { quantity produced }}-\frac{\text { total cost }}{\text { quantity produced }} \\ &=\text { average revenue - average cost } \end{aligned}