Considering the effects of mutual fear, internal breaks and trust/distrust (on which solution will depend) of both the countries for each other we will form differential equation for defense budget of each country with respect to the time passed if we start from t=0.
for country A whose defence budget is X, choosing all the known factors and the unknown ones, we have,
similarly for country B,
we get final solution of x i.e equation of defense budget of country A as
and final solution of y i.e equation of defense budget of country B as
Using initial conditions and finding values of c1 and c2, we get final answer as
For the complete method to solve the formed differential equation please follow the pdf given in the following link: