"enlighten me as to what must we do? " GTFO, but do it right, burn everything to the ground as we leave and not care one whit who or what takes over. Honestly, after Obama got Bin Laden we should have shut the op down.
OK, in Nam we were there ~20 years plus the Frogs were there 8, what's so hard to understand?
Since you're grasping at straws trying to think about this (your logic is bouncing around like a superball, hard to follow), here's three more similarities for you:
1. Both Vietnam and Afghanistan have a culture that measures time in millennia, not two or four year election cycles like we do. They can wait us out quite easily no matter how long we spend there.
2. We were trying to win the hearts and minds with flowery concepts like freedom and democracy when all the populace cared about was where their next bowl of rice or goat milk was coming from. They didn't give a damn what kind of system they lived under.
3. We were trying to fight guerilla forces that could easily blend into said civilian population. We were trying to use a force designed to meet and beat the Soviets in Europe against a force that didn't even wear uniforms.