An example of a calulus book reads:
A rectangular storage container with an open top has a volume of $10$ m . The length of its base is twice its width. Material for the base costs $10$ per square meter, material for the sides costs $\$6 per square meter. Express the cost of materials as a function of the width of the base.
We draw the diagram as shown below where w$ and $2w$ be the width and length of the base $h be the height.
The area of the base is (2w)w = 2w^2$, so the cost, in dollars, of the material for the base is $10(2w^2). I am able to understand upto this point.
The point which I am unable to understand is where it says two of the sides have area wh$ and the other two have area $2wh$, so the cost of the material for the sides is $6[2(wh) + 2(2wh)]$. I can take it from here if I get this.