“Russia” has never been in Afghanistan. The SOVIET UNION was our opponent in Afghanistan, and, thanks to Ronald Reagan, no longer exists. The US and RUSSIA should be allies in Afghanistan, not opponents.
That will be difficult indeed if putin partners with the Taliban.
One example.
"In 1880 Britain accepts Abdurrahman as amir of Kabul, agreeing at the same time not to demand residence for a British envoy anywhere in Afghanistan. When British troops finally withdraw in 1881 (having meanwhile helped Abdurrahman against some rebellious cousins), the political achievement of two costly wars against Russian interference seems on the debit side. But at least Abdurrahman proves an excellent amir."
http://www.historyworld.net/wrldhis/PlainTextHistories.asp?historyid=ad09