It was mentioned to Ibn Umar that Anas had narrated to them that the Prophet ﷺ entered the state of ihram for both an Umra and a Hajj. Ibn Umar responded, "The Prophet ﷺ entered ihram for Hajj alone, and we entered ihram for it along with him. When we reached Mecca, he said, 'Whoever has not brought a sacrificial animal should make it an Umra.' The Prophet ﷺ had brought a sacrificial animal with him. Then Ali bin Abu Talib came to us from Yemen as a pilgrim, and the Prophet ﷺ asked him, 'For what have you entered ihram, since your family is here with us?'Ali replied, 'I entered ihram for what the Prophet ﷺ entered ihram for.'The Prophet ﷺ said, 'Then remain in your ihram, for we have a sacrificial animal with us.'"
أنه ذكر لابن عمر: أن أنسا حدثهم أن النبي ﷺ أهل بعمرة وحجة، فقال أهل النبي ﷺ بالحج وأهللنا به معه فلما قدمنا مكة قال: من لم يكن معه هدي فليجعلها عمرة. وكان مع النبي ﷺ هدي، فقدم علينا علي بن أبي طالب من اليمن حاجا فقال النبي ﷺ: بم أهللت فإن معنا أهلك؟ قال: أهللت بما أهل به النبي ﷺ. قال: فأمسك فإن معنا هديا.
Bukhari narrated it in the Book of Military Expeditions (4353, 4354) from Musaddad, who said, Bishr bin Mufaddal narrated to us, from Humayd Tawil, who said, Bakr narrated to us, and he mentioned it.Muslim also reported it in the Book of Hajj (1232) through another route from Humayd Tawil, with some differences in wording, and it includes confirmation from Anas that the Prophet ﷺ made the intention for Hajj and Umrah together.