Alcoa agreed to buy South32's aluminum assets for up to $5.6 billion, expanding its position among the world's largest aluminum producers.