I doubt that the Taliban or the government of Afghanistan back in 2001 had any idea of the 911 plot or anything to do with it, pdq. They had no reason to want such a thing to happen, and the very strongest reasons not to want it to happen, as their concerns at the time were internal security, not the desire to goad the Superpower into invading them.
If the 911 plot was indeed organized by an Al Queda cell located in Afghanistan (and I'm not convinced it was) I think that it occurred completely without the knowledge or awareness of the Afghan government. I think it was done in complete secrecy, and that no one was aware of it except those who planned it and carried it out.
911 was not an attack on the USA by any nation or any government. It was an attack by a group of conspirators who had no army, no government, and who represented no one but themselves.
It was a criminal act, not an act of war. Criminal acts should be responed to on the basis of what they are. The appropriate response to a criminal act is to find and prosecute the people responsible for it, not to invade and smash up an entire country that did not plan the act and was not responsible for it.
If a secret group of Christian fundamentalists hiding out in Wyoming planned a terrorist attack on China...or Russia...and carried it out by hijacking some Chinese or Russian airliners and flying them into some big buildings in Moscow or Beijing, would that justify China or Russia attacking the entire nation of the USA, invading the USA, and taking it over?
No! It wouldn't. The proper response would be a criminal investigation to capture the conspirators. It would be insane to respond to such an attach with a war between nations. The American response to 911 was similarly insane...only on a bit smaller scale, fortunately. I doubt that the smallness of that scale was evident, however, to ordinary Afghans or ordinary Iraqis caught in the fighting...they have become the main victims of the 911 criminal act of terrorism. Their dead number in the hundreds of thousands, and they did not plan or carry out the 911 attacks.