I've been on both ends of the stick - as I am sure most people have at least once in their lives. We tend to start getting stuck in how we see things, and from that stuckness we make ourselves less and less flexible in other areas too.
I found that when I was the one being inflexible, it was when I had spent many moments over a long period of time building up "my defence" and all of my justifications, explanations and theories that "proves" that my opinion was solid and that there couldn't possibly be any other explanation. I imposed what made sense to me from a limited understanding / consideration of a situation. I imposed my expectations and probable choices onto others - thinking things like "the only way I would EVER do something like that is if I wanted to deliberately hurt someone, which *I* would *never* do". Obviously in those moments I got so lost in my fantasies of how I was righteous and amazing and the other person/people were terrible and mean, that I didn't consider the entire picture / context - I was considering things within a limited perception - MY limited perception. Often these experiences would end in me embarrassing myself by being shown that I did not consider everything - sometimes I didn't even TRY to gather different perspectives or information, such as by asking people what they see or experienced.
When I am the one trying to share a different perspective / consideration with another person(s) who is in that "stuck" experience, I have had mixed results in "getting the message through". When I am speaking with someone, if I react at all then I essentially blow whatever chance I had of getting through for that moment. If that happens I first stabilise myself, adjust the tonality of my voice and try again. A lot of the time you won't see someone considering anything outside of their opinion in one conversation, often they need to go and process the information when they're alone (and not feeling like they have to defend their opinion). They might then come to you some time later and say "you know what, I was being stubborn, I looked at everything again and realised that I hadn't considered those points you were trying to show me.". Sometimes they don't say a word, but will change their living application so that they start applying / testing those different perspectives. Sometimes, they do not budge at all. I find that I can only do so much with / for another, I can try use different words, different voice tonalities, different approaches, but ultimately it is up to each person to step outside of their "stuck" views and opinions to consider different perspectives.
So, my suggestions in either scenario are basically the same: stop reactions, slow yourself down. If you feel yourself having a very strong opinion about something, stop. If you feel yourself feeling like you are right (about anything!), STOP. Take a few moments to check yourself before you wreck yourself.