 When Gandalf rides out, using the light of his staff to ward off the  fell beasts so Faramirs team can get back to Minas Tirith, you see  that Pippin is on the horse with him, even though there would have  been no reason to bring him along. The reason is that this scene was  originally filmed to coincide with Gandalf and Pippins arrival at  Minas Tirith, but was pushed further back as the story evolved.