It appears there may be a misunderstanding in your statement. During the American Revolutionary War (1775-1783), France and Spain were allies of the American colonists, not the British.
France formally entered the war on the side of the American colonists after the American victory at the Battle of Saratoga in 1777. The French provided significant military support, including troops, naval forces, and financial assistance, which were crucial in helping the colonists achieve independence from British rule.
Spain also supported the American colonies indirectly by supplying funds and resources, although they did not formally join the war against Britain as an ally of the colonists. Instead, Spain engaged in military actions against Britain in other territories, which distracted British forces and resources.
In summary, both France and Spain were important allies of the American colonists in their struggle for independence from Britain.