Pro 26:4 Answer not a fool according to his folly, lest thou also be like unto him.
Pro 26:5 Answer a fool according to his folly, lest he be wise in his own conceit.
In Proverbs we have a biblical contradiction. Conveniently in adjacent verses. With common proverbs we can also find in sayings like, “He who hesitates is lost”, and “Look before you leap” contradicting admonitions.
The secular advice is not necessarily absolute. Both might be seen as subsets of a larger issue, that of considering alternatives. Each admonition would be appropriate for application to counter either hesitancy or intemperance.
These particular biblical adages can be seen beyond simply countering a particular situation. There are two different areas of concern. They might be blended by saying “Don’t answer a fool and get sucked into a fool’s folly. However, if you can resist such foolishness, you might be able to help a fool turn from his foolishness.”