Wiktionary
dig out of a hole
vb. (context idiomatic transitive English) To save someone or something from trouble.