How did America acquire Alaska and Hawaii?

In 1867 Alaska was bought from Russia for $7.2 million dollars. Alaska was purchased in 1867 and Hawaii was annexed by act of Congress in 1898.