There were at least 2 times when USA extended its territory by purchasing it outright - Louisiana+ from French and Alaska from Russians.
The Louisiana Purchase was the acquisition by the United States of America of 828,000 square miles (2,140,000 km2) of France's claim to the territory of Louisiana in 1803. The U.S. paid 60 million francs ($11,250,000) plus cancellation of debts worth 18 million francs ($3,750,000), for a total sum of 15 million dollars (less than 3 cents per acre) for the Louisiana territory ($233 million in 2011 dollars, less than 42 cents per acre).
Alaska Purchase: The negotiations concluded after an all-night session with the signing of the treaty at 4 a.m. on March 30, 1867, with the purchase price set at $7.2 million, or about 2 cents per acre ($4.74/km2).
While the historical non-monetary reasons for the transactions were already discussed on History.SE, there was obviously also a financial side involved.
Every transaction involves the buyer and a seller somehow deciding on a value that the item holds for them.
Question: What exactly was the process and the logic/algorithm by which both Russian, French and American governments arrived at the valuations quoted above?
The answer should reference historical documents, not just guesses.