When someone is drunk, it's a waste of time having a long conversation with them, explaining everything carefully. They won't remember, and they won't thank you.
It's similar with people who are closed-minded. Sometimes a question is being asked because a person wants to make progress. Sometimes it's to reinforce what position has already been adopted.
You talk to the person a week later, wondering if anything has sunk in, but it turns out they're in exactly the same position. Sure, you can pull an elastic band into whatever shape you want, but when you let go, it will snap back.
How can you tell? It's hard, because they can present similarly, although not identically. The trick is to find out whether the person has an open mind. You can do this by asking whether they already have a view of the situation or question. If they do, whatever you say will likely conflict with that view.
Although your input may initially be welcomed, their spiritual immune system will kick in, and their antibodies will proliferate, binding with and attacking the new ideas presented, from every angle, until the new ideas have been entirely eliminated.
If someone has no clue how to respond to a situation or question, that's a good sign. The restorative if they have already responded is to spend a period of time setting aside the existing response to make way for the new one.