TeX source:
\begin{aligned}\mathrm{C} &=(\text { bottom cost })+(\text { cost of front and back })+(\text { cost of ends })+\text { (top cost) } \\&=(\text { bottom area }) \cdot(7¢)+(\text { front and back area }) \cdot(5¢)+(\text { ends area }) \cdot(5¢)+(\text { top area }) \cdot(2¢) \\&=(w 1) \cdot(7)+(21 h) \cdot(5)+(2 \mathrm{wh}) \cdot(5)+(\mathrm{w} 1) \cdot(2)=7 \mathrm{w} 1+101 \mathrm{~h}+10 \mathrm{wh}+2 \mathrm{w} 1=9(\mathrm{w} 1)+10(\mathrm{th})+10(\mathrm{wh})\end{aligned}