So -- the main characters have dealt with the king. They want to leave. First, they want to free the prisoners without being caught by them as sorcerers.
They don't have any magical objects that would help. (The heroine ponders how something would have been useful, but it's destroyed.) And they don't even have the keys. The one that got free let the others loose with use of an axe.
Ponder. Ponder. Ponder. Especially since it's got to be quick, this is a trivial point to the plot.
Hmm -- maybe someone will go search for them among the soldiers and they can just hide.