He clarified "the dissolution of your oaths," which is His statement in Surah al-Ma'idah: "its expiation is the feeding of ten needy people" up to His statement: "then a fast of three days" (1).
His statement: "And Allah is your protector, and He is the All-Knowing" of His creation, "the All-Wise" in His command. Thus, the Messenger of Allah (peace be upon him) was commanded to perform the expiation, so he performed the expiation for his oath.