Deciding which character to save first can be tricky, but there’s more than one way to escape a prison.
This is a wholly unique section of the old temple, and you’ll have to break out each character separately. The Shadow Tactics: Blade of the Shogunteam is betrayed in Mission 10, leaving each character separated in the Mount Tsuru prison.