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:
![\begin{gathered} h=\sqrt[]{(6)^2-(4.5)^2}=\sqrt[]{36-20.25}=\sqrt[]{15.75}=3.96\approx4 \\ \Rightarrow h=4ft \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/l66cit1yo2iscch0ndt51aep62bm41km5v.png)
now that we have the height, we can calculate both areas to get the following:

since the roof consists of two triangles and two rectangles, the total area of the roof isL:

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:

so, dividing the total area of the roof by the area of one roof shingle, we have:

therefore, you need to buy 45 roof shingles