To solve the problem using the properties of similar triangles, we can set up a proportion based on the height of the flagpole and the length of its shadow compared to the height of the office building and the length of its shadow.
Let's denote:
- \( h_f = 40 \) feet (height of the flagpole)
- \( s_f = 25 \) feet (length of the shadow of the flagpole)
- \( h_b \) = height of the office building (unknown)
- \( s_b = 200 \) feet (length of the shadow of the office building)
Since the triangles formed by the flagpole and its shadow and the office building and its shadow are similar, we can set up the following proportion:
\[ \frac{h_f}{s_f} = \frac{h_b}{s_b} \]
Substituting the known values into the proportion:
\[ \frac{40}{25} = \frac{h_b}{200} \]
Now, cross-multiply to solve for \( h_b \):
\[ 40 \cdot 200 = 25 \cdot h_b \]
\[ 8000 = 25h_b \]
Now, divide both sides by 25 to find \( h_b \):
\[ h_b = \frac{8000}{25} \]
\[ h_b = 320 \text{ feet} \]
So, the height of the office building is 320 feet.