What two countries contributed to the American victory in the American Revolution?
I assume that this question refers to the American victory in the Revolutionary War. This is the most prominent war in which exactly two countries helped America to win. I have changed the question to show that.
In the Revolutionary War, the colonies achieved victory with help from Spain and from France. Both of these countries were motivated mainly by their desire to see Great Britain weakened. Both Spain and France had much more absolute monarchies than Britain did, so they were clearly not helping the American colonies on the grounds that democracy was the best form of government. Instead, they were enemies of Britain and wanted that country to be weakened.
Of these two countries, by far the more important was France. It was French aid that truly allowed the Americans to win the war. Without French money, arms, and soldiers, the colonists would have been much less likely to win. Without French naval help, the final battle at Yorktown could not have been won.
The French, then, were the main source of foreign aid for the colonies, but Spain helped as well.