Yes, it's correct, but it's a mixed metaphor. No one would say this. Both parts of the sentence are metaphors, unless you are actually in a firefight, either fighting a fire, or shooting guns at the enemy, while there is a pan of oil on the stove. To sound more natural, you might consider: 1. Can you teach me how to survive in the firefight when things look to be hopeless?, and 2. The situation was very dangerous, as when children are in the kitchen with boiling oil on the stove. -- In other words, use only one analogy or metaphor at a time. (A metaphor is when you say something is a different thing, to bring clarity, but it's not true. In your example, if it's not really a firefight, that's a metaphor. If there's not really oil in the pan, that's also a metaphor. A related concept is simile, when you soften it a bit by using the word "like" or "as". "He was like a lion in battle." (simile) "He was a lion in battle." (metaphor). Is this clear?