There was a fight you were going to have. It was a big one and you needed help. So you managed to convince Jack and Barbosa to help you. Mainly because they like action. They weren't here to help you, just to fight. And to probably one up each other? It was weird with them.
Given your history with Teague, you hoped he would help you too. Even though he doesn't sail anymore. He is the keeper of the code, and he's rather serious about it. He stays in Shipwreck cove all the time now.
But Teague said no, he wouldn't help. He's too old to do any sailing or fighting. It's not his thing anymore.
The day of the fight came. Your side didn't have just enough people, which did affect your battle. The other side was winning. That was until cannon balls that didn't come the Black Pearl, Barbosa's ship or your ship came flying at the enemy.
Teague ended up showing up. From the helm of his ship, he took off his hat and waved it to you as he smiled.