To derive the formula of the surface area of a rectangular prism, follow closely the steps below. Start with a right rectangular prism as shown below and call the length l, the width w, and the height h.
In order to make a rectangular prism like the one shown above, you basically use the following rectangular prism template:
Looking at the rectangular prism template, it is easy to see that the solid has six sides and each side is a rectangle.
The bottom side and the top side are equal and have l and w as dimensions.
The area for the top and bottom sides is l × w + l × w = 2 × l × w
The front side (shown in sky blue) and the back side (not shown) are equal and have h and l as dimensions.
The area for the front and the back sides is l × h + l × h = 2 × l × h
Then, the left and right sides have h and w as its dimensions. One side is shown in purple.
The area for the left and the right sides is w × h + w × h = 2 × w × h
The total surface area, call it SA is:
SA = 2 × l × w + 2 × l × h + 2 × w × h