Can I play a card for its miracle cost in this situation?
No, Terminus could not be played here
As you already suspect, that the Terminus is a new object at the end of the sequence of plays you describe. It's still in playerB's hand where the miracle trigger would expect it, but it's a new object regardless, because it changed zones.

400.7. An object that moves from one zone to another becomes a new object with no memory of, or relation to, its previous existence. [..]

The complete rules for miracle also mention what happens when the Terminus in this case leaves the hand:

702.93a Miracle is a static ability linked to a triggered ability (see rule 603.11). “Miracle [cost]” means “You may reveal this card from your hand as you draw it if it’s the first card you’ve drawn this turn. When you reveal this card this way, you may cast it by paying [cost] rather than its mana cost.”
702.93b If a player chooses to reveal a card using its miracle ability, they play with that card revealed until that card leaves their hand, that ability resolves, or that ability otherwise leaves the stack.