EXPLANATION
Let's see the facts:
Shadow = 30 feet long
height of the building = unknown
flagpole height = 15 feet
flagpole shadow = 10 feet
We can set up a proportion comparing the height of each object to the length of the shadow.


Multiplying both sides by 15:

Multiplying numbers:

The height is 45 feet