This objective you complete by basically going from ship to ship and freeing the pirates
You can get from one ship to another by jumping to the water and swimming toward that ship then climbing it
Each ship will have lots of enemies on it, you can either use stealth to assassinate them quietly, or fight them.
Note that you cannot free the prisoners as long as you are in conflict mode, you will get the message:
There is a group of prisoners also inside one of the ships under the deck, where you can use corner assassinations just like in the first objective in this memory
Once you have freed the required number of prisoners, the mission will advance