These two were not exactly Iran's nemesis. The zio-American empire was, is and will remain Iran's actual and primary existential foe. From Iran's perspective, with the US invasion of Iraq, a, ex-threat was replaced by a much bigger one.
They didn't really know (as in know for sure) that Saddam's toppling would lead to Iran-friendly elements gaining in influence in Iraq because nobody can predict these sorts of developments with certainty. In reality, it stemmed from Iran's own efforts and in particular from the application of Qasem Soleimani's guideline: "to turn threats into opportunities". The US occupation Iraq was potentially as much a threat to Iran as it was an opportunity: all depended on how each party would play its cards, and Iran just played them better than America.
Another point is that Shia are not automatically pro-Iranian. The US attempted to favor dissident ex-Ba'thist Shia like Iyad Alawi who were very hostile to Iran, and to cultivate a pro-western, liberal but religious Shia current in Iraq recruited from former opponents to Saddam (such as the London-based ayatollah Khoei), who would be equally opposed to Iran. It failed on both counts.
The US was planning to attack Iran as per its post-911 plans for the a "new Middle East", and the regime in Washington was enjoying the support of a unanimous domestic public and political class than were thirsting for revenge. In fact, it'd have been stupid for Iran to enter the 2003 war in any shape or form. In that sense, the phrase "looked the other way" is an inadequate one here, since it suggests that it was somehow incumbent upon Iran to enter the fray militarily, which is not the case.
To effectively confront the threat of massive US military presence to its west, Iran could have entered the war in a conventional manner against the US - which would have failed since Iran is no match for the US in a head to head conventional war; proposed to send over 3 million Basijis plus tens of thousands of IRGC forces - which Baghdad would certainly not have accepted; or proceed to support Iraqi Resistance factions against US occupation forces after the invasion - the most rational option, and the one Iran went for.
Iran was glad to see the Taliban and Saddam gone. They did not throw any roadblocks in the path of US military action. They did not even try to bargain. Nothing in your response disproves it.
Sure Iran has different ideas on who replaces the Taliban and Saddam. Any Shia regime is preferable to Saddam's for Iran.