From: Rabbi Moshe Sofer
To: Rabbi Itzik
The Chasam Sofer rules that if milah and pidyon haben fall on the same day, milah is performed first as a matter of hiddur mitzvah, but one may not delay pidyon haben to wait until the child is fit for circumcision. Since the preference for milah first is based solely on beautification rather than a halachic prerequisite, it cannot justify delaying the fulfillment of pidyon haben. He also resolves a contradiction in the Ya'avetz by distinguishing milah lishmah for converts — who require it as entry into the covenant — from born Jews, for whom milah is simply one of the 613 commandments.
Source: Shu"t Chasam Sofer YD §300