Say there no 1978 Afghan coup and Afghanistan remains neutral in the cold war
How long would the soviet union last
What would the end of the soviet union long like if it lasts longer
Without the war in Afghanistan the Soviet Union might well have lasted slightly longer or even collapsed earlier. The economic costs of the war were minuscule and even human casualties tolerable (15000 over 10 years in a totalitarian society).
The basic problems of Soviet Union were still there. Reliance on oil and Western credit, gigantic defense budgets, aging industrial machinery, an economy suited to produce early 20th Century goods...
The invasion of Afghanistan resulted in more confrontation with the West which may have hastened or lengthened the life of Soviet Union. Without confrontation there probably would not have been the "rallying around the flag" effect. The Soviet propaganda would have been even less succesfull internally and externally, as confrontational rhetoric of Western politicians was great material for them. "Madman in the White House on the red button" was a widely believed (wrongly!) meme during 1980's all around the world. (As in real life Reagan was probably the US Cold War president least inclined to use nuclear weapons).
With no apparent threat there would be no reason for gigantic military spending and economic hardship. There would be also more Western contacts on lower and higher level resulting in even faster knowledge on Western cultural and economic progress.