The second example is not currently grammatically correct. It could be made correct (though still not good) like this:
...in response to the current situation in Afghanistan, in which the Taliban has taken over most of the country, which resulted from the withdrawal of US troops.
See, in the first example,
the current situation in Afghanistan, where... the "where" is a preposition referring to the place Afghanistan. And continuing,
... where the Taliban has taken over *as a result of* ... means that the clause "as a result of" modifies "take over."
In the second example, there's no way to make sense of "... has taken over which resulted from." We can rescue the clause by changing what it modifies. If "which resulted from" instead modifies the word "situation," from earlier in the sentence, then we have
the situation, ... which resulted from. Now what came in between, "where the Taliban has taken over," is a dependent clause simply explaining "the situation." We still have one little problem because now the word "where" doesn't make sense. People often use "where" colloquially in this way to connect ideas without actually suggesting place, like the titles of episodes of the tv show Friends ("The One Where Joey Gets A Turkey Stuck on His Head"), but it's not good for formal usage.
But that's a lot of work to go through when, even with those fixes, the first choice is more direct and natural.