The correct answer to this open question is the following.
Unfortunately, you did not include the countries you are referring to neither the power ranking. Without that information, we do not know what are the countries of this question or the name of the war.
However, doing some research and using traditional concepts of the history of wars, we can comment on the following general terms.
We are going to refer to World War II.
Before the war, Germany amassed great military power due to many technological advances that other countries couldn't develop first. This gave Nazi leader Adolph Hitler the confidence to carry on with his plans, invaded Poland, and initiate World War II.
On the Allied side, France and Great Britain combined the weaponry and battleground experience to confront Hitler's troops, but they needed the numbers of the Soviet Union to present a serious defense. Things got very difficult for the Allied Forces and the United States had to abandon its foreign policy of neutrality after the Japanese attack over Pearl Harbor Iland in December 1941 and President Roosevelt decided to enter the international conflict.
After the war was over, and taking into consideration that Europe was the battlefield of the conflict, all the European nations involved resulted in huge damages, deaths, and destruction.
The United States came up with the Marshall Plan to help West European countries to recover from the war and those countries generated a deep debt to the United States. The US increased its power and a final ranking regarding the military could be this.
1.- The United States. 2.- The Soviet Union. 3.- Great Britain. 4.- France. 5.- Germany.