Final answer:
The United States purchased Florida from Spain for $5 million through the Adams-Onís Treaty of 1819, enabling continental expansion and settling outstanding colonial claims.
Step-by-step explanation:
The territory the United States purchased from Spain for $5 million was Florida. This acquisition was formalized through the Adams-Onís Treaty of 1819. Secretary of State John Quincy Adams negotiated with Spanish foreign minister Don Luis de Onís, capitalizing on Andrew Jackson's previous military escapades in Florida to pressure Spain into the sale. This treaty not only secured Florida for the United States but also had Spain relinquish its claim to the Oregon Territory while the U.S. temporarily renounced its claim to Texas.
The purchase facilitated further expansion across the continent, creating opportunities and molding the geopolitical landscape. The payment going back to the colonists likely refers to compensations for their claims against the Spanish government, which were assumed by the United States as part of the treaty provisions.