This was when Ace and Luffy were still kids.
Ace asked Makino to teach him how to express gratitude properly for he wants to thank Red-Haired Shanks for saving his brother Luffy.
They started with how to introduce properly. And it went out to be a funny scene.