Given the information on the picture, we have to find the area of these two figures:
first, we can find the height of the triangle using the pythagorean theorem:
[tex]\begin{gathered} h=\sqrt[]{(6)^2-(4.5)^2}=\sqrt[]{36-20.25}=\sqrt[]{15.75}=3.96\approx4 \\ \Rightarrow h=4ft \end{gathered}[/tex]
now that we have the height, we can calculate both areas to get the following:
[tex]\begin{gathered} \text{ Area of the triangle:} \\ A_1=\frac{9\cdot4}{2}=\frac{36}{2}=18ft^2 \\ \text{ Area of the rectangle:} \\ A_2=12\cdot6=72ft^2 \end{gathered}[/tex]
since the roof consists of two triangles and two rectangles, the total area of the roof isL:
[tex]\begin{gathered} A=2A_1+2A_2=2(18)+2(72)=36+144=180ft^2 \\ \Rightarrow A=180ft^2 \end{gathered}[/tex]
therefore, the area of the roof is 180ft^2
Now, we have that the shingles have measures 2ft by 2ft. This means that they have a square form, and their area is:
[tex]A_3=2\cdot2=4ft^2[/tex]
so, dividing the total area of the roof by the area of one roof shingle, we have:
[tex]\frac{180}{4}=45\text{ roof shingles}[/tex]
therefore, you need to buy 45 roof shingles