MTG: Can I use the ability of my Five-Alarm Fire before it getting destroyed? How does priority works here?
Yes, and yes for the most part. 

Unless an ability has a timing restriction (e.g. it says "use this only during your upkeep") or is on a summoning-sick creature, you can use it whenever you have priority. Side-note: Mana abilities, which are like Tap: Add G to pool, have slightly different rules but those aren't relevant to this.

So for part one, he'll go to demystify, which'll put it on the stack and can either put another action on the stack or pass priority. Assuming he passes, you can then respond with activating it and put that on the stack above the demystify. He'll have a chance to respond to that. If he passes, he gets shot, a priority wave happens, his demystifies resolves and your Five-Alarm blows up.