IMO Afghanistan is a lost cause (it is fundamentally unwinnable at any price worth paying for a win; any victory will be at best Pyrrhic. You can pretty readily destroy AQ's ability to operate (completed in early 2002), but you can't turn Afghanistan into anything but a basketcase.)
Iraq, however, was obviously maneuver early on, on the part of the US (who kicked ass; the war in a conventional sense really was won in a few weeks/months -- a reasonable person could have pulled out at that point, and we might have had some stupidity at the Presidential and State Department levels not happened). It then turned into maneuver warfare by the insurgents -- striking the weak link of the US, the large logistics convoys, largely operated by KBR under LOGCAP, needed to supply the logistics-heavy US force. (and arguably the same thing has happened in Afghanistan, aided by the terrain and Pakistan.)
The relative victory post-2007 was primarily due to the old British Empire tactic of dividing your enemies (i.e. buying off both the Shia militias by putting US forces in small posts in their territory to keep them safe from the Sunnis, and by bribing the Sunnis as "Sons of Iraq" to join the US as well) -- with FREs largely destroyed by this time, it meant leaving only AQ, straight-up criminal gangs, and some seriously hardline Shia (Iran-linked) enemies.
Those guys essentially got defeated by the "task force with many names" (6-26, 121, 88, assorted colors, etc.); essentially JSOC. It was pretty much the same as you'd roll up organized crime in the US (i.e. watch The Wire) -- identify high value targets, "human" focal points, and then go kill/capture them. By removing the bulk of non-hardline opposition, the US was left with thousands of enemies, of which only tens or hundreds were key -- and they ended up dying pretty fast.
Small JSOC units operating from the air, from civilian vehicles, etc. were highly mobile, so it was essentially maneuver warfare at the small scale. Essentially all "raid" type SOF missions depend on speed and mobility; there is no way for even a 10x better trained/equipped force to stand and fight against a much larger conventional force for a long period of time, outside of a video game.
Iraq, however, was obviously maneuver early on, on the part of the US (who kicked ass; the war in a conventional sense really was won in a few weeks/months -- a reasonable person could have pulled out at that point, and we might have had some stupidity at the Presidential and State Department levels not happened). It then turned into maneuver warfare by the insurgents -- striking the weak link of the US, the large logistics convoys, largely operated by KBR under LOGCAP, needed to supply the logistics-heavy US force. (and arguably the same thing has happened in Afghanistan, aided by the terrain and Pakistan.)
The relative victory post-2007 was primarily due to the old British Empire tactic of dividing your enemies (i.e. buying off both the Shia militias by putting US forces in small posts in their territory to keep them safe from the Sunnis, and by bribing the Sunnis as "Sons of Iraq" to join the US as well) -- with FREs largely destroyed by this time, it meant leaving only AQ, straight-up criminal gangs, and some seriously hardline Shia (Iran-linked) enemies.
Those guys essentially got defeated by the "task force with many names" (6-26, 121, 88, assorted colors, etc.); essentially JSOC. It was pretty much the same as you'd roll up organized crime in the US (i.e. watch The Wire) -- identify high value targets, "human" focal points, and then go kill/capture them. By removing the bulk of non-hardline opposition, the US was left with thousands of enemies, of which only tens or hundreds were key -- and they ended up dying pretty fast.
Small JSOC units operating from the air, from civilian vehicles, etc. were highly mobile, so it was essentially maneuver warfare at the small scale. Essentially all "raid" type SOF missions depend on speed and mobility; there is no way for even a 10x better trained/equipped force to stand and fight against a much larger conventional force for a long period of time, outside of a video game.