All the Taliban did was just wait till the American went home. They hardly even engaged western forces, so I wouldn't say it was a military defeat.
Classic guerrilla warfare tactics
- When your enemy attacks, you retreat.
- When your enemy reaches the limit of his advance, you begin harassing him (using snipers, roadside bombs, booby traps and similar measures).
- When your enemy retreats, then you attack.
The whole idea is to make it a "protracted campaign", so that your enemy (particularly if it is a Western power) eventually loses the stomach for the fight. Every power that has attempted to occupy Afghanistan has learned this - usually the hard way!