Lets consider two countries.
So there are two countries country A and country B. Let the defense budget of country A be X and of country B be Y. The rate of change in defense budget of both the countries will depends on mutual fear and internal breaks. For simplifying problem we will take ratio of mutual fear to be 2:4 and of internal breaks to be 1:3 and initially defense budget of A is 1 unit and of B is 4 units. We will find the equation of defense budget of each country and will give conditions for further peace of both countries.