To solve this problem using the properties of similar triangles, we can set up a proportion based on the height of the flagpole and its shadow compared to the height of the office building and its shadow.
Let:
- \( h \) be the height of the office building.
- The height of the flagpole is 40 feet.
- The shadow of the flagpole is 25 feet.
- The shadow of the office building is 200 feet.
We can set up the proportion as follows:
\[ \frac{\text{height of flagpole}}{\text{shadow of flagpole}} = \frac{\text{height of building}}{\text{shadow of building}} \]
Substituting the values we have:
\[ \frac{40}{25} = \frac{h}{200} \]
Now, we can cross-multiply to find \( h \):
\[ 40 \times 200 = 25 \times h \]
Calculating the left side:
\[ 8000 = 25h \]
Now, divide both sides by 25 to solve for \( h \):
\[ h = \frac{8000}{25} = 320 \]
Thus, the height of the office building is 320 feet.