Search the gun locker, take a ramrod, a few fuses, and some cannon canisters.
Take some powder from the barrel next to the cannon.
Use gunpowder on the cannon.
Then the ramrod.
Then the canister.
Then a fuse.
Fire the cannon!
Use the ramrod on the cannon again to clean it.
Repeat until 3 pirates die.
Talk to Bill
Search the gun locker, take several cannonballs, fuses and cannon barrels.
Fire the cannon with cannonballs until you put three holes in the enemy's ship. This is done with the same sequence above except instead of a canister, a cannonball is used instead - you will likely have to fire it more than three times and possibly repair it multiple times.