The afgans - they did not lead to the retreat of the URSS. After all the guerilla war -
heavily helped by american weaponry - the URSS was still there, still dominant.
The URSS retreated because it was in meldown due to internal reasons. Afgans - minor factor, at best.
The British - much like all europeans - retreated because of the zeitgeist, helped by the fact that maintaining a colonial empire was no longer profitable enough to be worth the trouble - due to economic, commercial reasons. And they were exhausted by WW2. Rebellions, etc - minor factors, at best.
America was never conquered territory, treated as such.
Except for the indians. I'm still waiting for their glorious liberation.