Today Turkmenistan and Tajikistan are separate countries bordering Afghanistan.
IN 1979 they part of the USSR. The Soviet invasion axes of Afghanistan went through them.
“When Russia invaded Afghanistan in 1979 they bordered each other.”
Russia NEVER invaded Afghanistan.