The correct answer is option b. Upon hearing the fire engines, the apartment building was evacuated.
A dangling modifier is a type of modifier that describes a word or phrase that is not clearly stated in the sentence, making the meaning of a sentence unclear. The sentence 'Upon hearing the fire engines, the apartment building was evacuated.' does not specify who heard the fire engines. In fact, there is nothing in the sentence to which the modifying phrase 'Upon hearing the fire engines' can refer; consequently, it is a dangling modifier.