The correct connection is: Their relationship had to improve for the Soviets to reduce military spending.
Gorbachev's policies of glasnost (openness) and perestroika (restructuring) aimed to improve the Soviet economy and political system. He recognized that reducing military spending could help to allocate resources to the struggling economy, and improving relations with the United States was essential for achieving arms reduction agreements, such as the INF Treaty, which ultimately allowed for a decrease in military expenditures.