Return of the King Book 5, Chapter 9
The next morning Legolas and Gimli are reunited with the two hobbits. Imrahil speaks to them but must leave to discuss affairs with Aragorn. As he leaves, Legolas says "'That is a fair lord and a great captain of men.'" Book 5, Chapter 9, pg. 164. They go to the houses of healing and Pippin asks about the Paths of the Dead. Gimli is ashamed to tell the tale but Legolas is willing to speak of it. The rode out of the mountain and sped for five days. They came to the Anduin and overthrew the fifty ships of the southern army. Aragorn claimed the ships were still afloat and filled them with men who had gathered around him. He told the Army of the Dead that their oath was finished and they disappeared. They sailed up the Anduin for a couple of days and found Minas Tirith in flames. They surged onto the plain of Gondor and defeated the enemy.
Imrahil joins Gandalf, Aragorn and Eomer. Gandalf recites the dying words of Denethor and says that they can either attack Mordor or wait for another siege. He guesses that Sauron is in doubt and if they attack it will draw the Dark Lord's attention from Frodo as he tries to destroy the ring. Although prudence would have them remain behind and defend the city. He thinks that they must rush forward and surprise Sauron in the hope that Frodo will destroy the ring before they face his full strength. When Gandalf pauses, everyone else is silent. Aragorn says he will go. Eomer and Imrahil say that some men need to be left behind to defend the city. Aragorn tells them that there are four thousand men who will arrive in two days to help them. They count the number of their troops and realize that after they leave adequate defense for Gondor, they will only be able to advance with seven thousand men. Aragorn and Gandalf say that Sauron will not laugh at them and Aragorn says "'if this be jest, then it is too bitter for laughter.'" Book 5, Chapter 9, pg. 175. Two days later the army is assembled. Legolas and Gimli go with them and Merry is upset that he is too hurt to go. Pippin marches as a soldier of Gondor.