Answer not a fool according to his folly, lest thou also be like unto him. Answer a fool according to his folly, lest he be wise in his own conceit.
Well, so what are you supposed to do? Answer him according to his folly or not? But here, as elsewhere, a word to the wise is sufficient. If both of these are true -- and they are certainly easy enough to confirm in everyday life -- the wise thing to do is never put yourself into situations where you have to choose whether to answer fools according to their folly. And, while maxims often seem randomly thrown together in Proverbs, this makes sense in context, since they occur in a brilliant series of drily ironic proverbs on the foolishness of dealing with fools (this time from the NIV):
A whip for the horse, a bridle for the donkey,
and a rod for the backs of fools!
Do not answer a fool according to his folly,
or you yourself will be just like him.
Answer a fool according to his folly,
or he will be wise in his own eyes.
Sending a message by the hands of a fool
is like cutting off one’s feet or drinking poison.
Like the useless legs of one who is lame
is a proverb in the mouth of a fool.
Like tying a stone in a sling
is the giving of honor to a fool.
Like a thornbush in a drunkard’s hand
is a proverb in the mouth of a fool.
Like an archer who wounds at random
is one who hires a fool or any passer-by.
As a dog returns to its vomit,
so fools repeat their folly.
Do you see a person wise in their own eyes?
There is more hope for a fool than for them.
Ah, blogosphere: either Solomon or the men of Hezekiah who gathered up these Solomonic maxims were true prophets, and saw you even then.