How do the dwarves escape?

Can you answer this question?