But, I am also sure, he does not want Taliban to take over the Afghanistan.==
In sweet part you right Putin glads to see American defeat there from towel heads. But on second part you are wrong.
IMHO Putin care les who will hold power in Afghanistan. It is just foreign country which has no importance to Russia. If islamists spread in Central Asia then it might help Russia to curtail Chinese interests there. Which is good for Russia.
I disagree. Afghanistan used to be Soviet neighbor.
Russia has a lot of Muslims and the central Asian countries, from the former Soviet Republic, which are client states of Russia, are mostly Muslim.
The Russian Muslims are of the moderate type. If somebody would try to radicalize himself, he is quickly exterminated.
But, I am sure, Putin is supper worried about possible spread of the radical Muslim movement from Afghanistan into the Central Asia and Russia. If this catches on, you would hear of fighting in Central Asia. They must avoid that in any way possible.
That’s why they are already supporting the budding opposition. See bottom of this
https://www.foxnews.com/world/taliban-resistance-afghanistans-panjshir-valley
Tajikistan decided to support anti Taliban movement.