If they've any sense they will take the French approach: Special forces assassinate as many pirates and as few hostages in a overwhelming use of deadly force to recover the ship. If a few hostages get caught in the crossfire then so be it.
The French have done this. French ships get left alone. Ruthless but effective.