Tohil's feathers stand up, but she quickly calms herself and hustles you onto the tender for a more private conversation.
It is possible to break out the Captain and still go through with your plan to work with the Ministry of War against Trionyx. The important thing is timing.
If you do break out the Captain, the Templars will hunt you and anyone from your ship relentlessly. However, their authority ends at the water's edge. You may not be able to come back to Malatra, at least not for a while. Tohil and her brother may need to lie low for a time. But if you have done everything you needed within the actual city, they can't pursue you further.
If you are able to convince the Minister of War of the threat, he can decide to work with you regardless of how the Templars feel. The Minister of War may even be able to calm the Templars down -- although you can't count on that.
But he certainly will not take a meeting with wanted men, even with the Majari's leverage. If you still want to work with the navy against the pirate fleet, you should put off any breakout until after you have met with the Minister of War.
There are different kinds of jails in Malatra, but in this case the Captain is being held at a sacrifice pit. They are virtual fortresses, guarded by templars, clerics, and--most importantly--all the dangerous beasts and monsters held there. There are three different sacrifice pits; the Captain, being a malison, will be at the nearby Coliseum. The jail cells, like the monster cages, are located underground, beneath the open-air arena where criminals are sacrificed to the gods in the trial by combat.Once answered what is the jail like?
Ten gold should do it. Perhaps even less, but the Templars are unusually hostile on this one. Maybe she can find out why while she's greasing palms.