In Gulliver's Travels, how does Gulliver's interaction with Pedro de Mendez help to show the theme of the book?
One overall concept of Gulliver's Travels is that every society he finds paints all other societies, races, or creatures with a broad brush. There is no room for ambiguity and so, for example, the Houyhnhnms view all Yahoos, including Gulliver, as inferior beings with no possibility for improvement. When Gulliver meets Pedro de Mendez, he is so acclimated to the Houyhnhnm way of thinking that Mendez's civility and intellect astonishes him:
...Don Pedro... assured me, "he only meant to do me all the service he was able;" and spoke so very movingly, that at last I descended to treat him like an animal which had some little portion of reason.
In gratitude to the captain, I sometimes sat with him, at his earnest request, and strove to conceal my antipathy against human kind, although it often broke out; which he suffered to pass without observation.
(Swift, Gulliver's Travels, eNotes eText)
Mendez is Gulliver's first exposure to a thinking, non-savage Yahoo, and so his worldview -- entirely affected by living with the Houyhnhnms -- is altered again. Now he finds that his instinctual revulsion to Yahoos is based only in his own prejudice, but he has trouble getting past it, and so finds life in Human society difficult. By showing Gulliver the inherent decency of a random stranger, Swift satirizes the common desire to pigeonhole groups of people; Mendez is no Yahoo, and in his generosity far above Gulliver himself, who is so convinced of his Houyhnhnm-based superiority that he all-but rejects Mendez's overtures of friendship. This allows the reader to look back at the book as a whole and see how each society contains prejudice and bias against others; because of Gulliver's status as the reader's avatar, the reader is challenged to empathize with both the humans that Gulliver rejects and with his own damaged self.