Russia is not bombing ISIS, it is bombing the freedom fighters who rebelled against the totalitarian reign of Assad. It’s a four-way fight at least: ISIS, Baath Party forces under Assad, Russia, Iran, Kurds, Iraqis, and the US-led Coalition.
I agree that the US have supported some very dodgy regimes under the arab adage that “The enemy of my enemy is my friend.” You forgot to mention that they funded and supported Osama Bin Laden against the Russians, thus creating the force that caused 9/11. That enemy of my enemy was definitely NOT my friend. We can argue over US international policy but The Shah was better (for the West, and arguably for the average Irani) that the Shiite fanatics that rebelled against him, and the US needed a secure source of Oil back in the day, that made the Saudis a necessary ally, even after Saudi Wahabi fanatics took out the Twin Towers.
Some US decisions are very questionable, but I guess they all looked sensible at the time. I would have bombed Hiroshima to end a war that would have killed millions more if Nukes were not used. I wouldn’t have bombed Nagasaki though: it was the centre of Christianity in Japan; I’d have picked somewhere else. The US military didn’t know this however; the targets were picked at random, except they had to be small cities to minimise the civilian death toll: they chose not to bomb Tokyo or Osaka for instance.
The stated reasons for Russian action in Georgia and Ukraine are just propaganda: They were invaded to ensure neither country joined NATO and as a warning to NATO, that NATO bases on the Russian border would not be acceptable to Russia.