David Miller and Temba Bavuma both scored centuries to power South Africa to a 32-run win over Australia. The victory in Johannesburg secured a series win for South Africa.