Why is Budapest called Buda and Pest?

Originally, the capital consisted of three cities( Buda, Óbuda, and Pest) separated by the river Danube. in 1873 these three cities were united. Since then the official name of the capital is Budapest.