1. Ravana's story
As defined in your question:
Here person A is Yama and person B is Ravana.
As per UTTARA KANDA of Ramayana:
Kaladanda (the rod of time) is weapon of Yama. This rod of time, immeasurable might and incapable of being resisted by natures, was created by Lord Bhrahma as having the power of compassing the death of all beings. If this alights on any one, he doth not live for a moment.
But Ravana also got a boon from Lord Bhrahma and he was incapable of being slain by Nagas, Yakshas, Daityas, Danavas and the Devas.
How that situation got resolved
When Yama wanted to kill Ravana with his Kaladanda (the rod of time), the great father (Lord Bhrahma) manifesting himself and spoke unto Yama:
O mighty armed one, O thou of imeasurable prowess, this certainly must not be: Thou shouldst not with thy rod slay the Rakshasa (Ravana); for, O the foremost of Devas, I have conferred a boon on him; thou shouldst not render false the words that I have uttered. Verily he, that, whether a god or a human being, who falsify my words, shall render this triune universe waste. There is no doubt about this. Whether on this weapon allighting, the ten necked (Ravana) does not die, or if he dies, either way falsehood is the consequence. If thou have any care for these worlds do thou establish my truth.
Thus addressed, Yama then answered, I restrain this rod. Thou art our Lord. But as I restrain not slay this one who hath obtained a boon, what then shall I do now in the battlefield? Therefore shall I disappear from the sight of this Rakshasa (Ravana). Having said this, even thus did he vanish with his car and horses.
2. Daksha's story
23. Drona's story
Everyone knows how Dhrishtadyumna killed Dronacharya. This is already discussed in this question.
34. Soma's story
45. Banasura's story
56. King of Kashi's story
There may be many more instances of such Deadlocks, one I heard was King Veermani and Lord Shri Rama's battle where Lord Shiva helped Veermani in the same way how he helped Banasura and result was also similar.:
As per few stories, Bhishma had a boon that he can choose the time of his death and Shikhandi (or Amba in previous birth) had a boon that he/she will be the cause of Bhishma' death. So, this was also the case of Deadlock.
This question is partially related with the below question:
Why did Hanuman fight with Lord Rama? (question's title is wrong)
Disclaimer:War between Danavas (from Rasatala) and Ravana also resulted in Deadlock which was resolved by Lord Bhrahma himself.
By any means I am not trying to say that Vishnu is superior to Shiva or vice-versa. I believe in the concept that Trinity and Shakti are equal and we should not compare them at all. Above Trinity and Shakti, I believe that one Supereme being is there and different different sects call that Supereme being with different different name (such as AdiShakti, SadaShiva, Bhrahmn, AdiNarayana). No further comments on Shiva v/s Vishnu will be encouraged.