Rip Hunter paraphrases Aragorn's famous speech from "Return of the King" while Tolkien is listening intently. However, that particular speech was not written by Tolkien. It was by Fran Walsh, Phillipa Boyens and Peter Jackson specifically for the film.
Title of the episode spoofs the movie's title; Stein says "One cannot simply walk into the middle of a war zone", paraphrasing Boromir's "One does not simply walk into Mordor"; An army general says "Fool of a Tolkein", paraphrasing Gandalf's "Fool of a Took"