Here is the answer to your query.
Let B be the building and A be the fire.
Given : P and Q are 2 fire stations 30 km apart.
Let the height of AB be h km
and PB = x km. then BQ = (30 – x) km
also ∠APB = 60° and ∠AQB = 45°