The Library - S2-E10
Trivia: Wan Shi Tong is of one the few things in this show that is not a reference to Asian cultures, but to Ancient Greece instead. In their mythology owls were the symbol of wisdom and their goddess of wisdom, Athena, was often depicted with an owl.
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.