The Southern Air Temple - S1-E3
Other mistake: When the gang is in the Hall of Statues of Past Avatars, Katara points out the avatar cycle pattern of statues and Aang zeroes in on Roku's statue. The earthbender avatar statue next to Roku is of an unknown man with a sword, not Kiyoshi. (00:12:50 - 00:13:35)
Answer: The pirates are from the episodes "The Waterbending Scroll" and "The Waterbending Master" (They're the ones Katara stole the scroll from). The traveling musicians are from "The Cave of Two Lovers. The prisoners of war likely refer to the Kyoshi Warriors, the men of the Southern Water Tribe, and possibly Bumi and the other citizens of Omashu.