Kaab bin Ujra met me and said, "Shall I give you a gift? The Prophet ﷺ came out to us and we said, 'Messenger of Allah, we already know how to greet you with peace, but how should we send blessings upon you?'He replied, 'Say, O Allah, send blessings upon Muhammad and upon the family of Muhammad, as You sent blessings upon the family of Ibrahim. Indeed, You are Praiseworthy and Glorious. O Allah, send Your grace upon Muhammad and upon the family of Muhammad, as You sent Your grace upon the family of Ibrahim. Indeed, You are Praiseworthy and Glorious.'"
لقيني كعب بن عجرة فقال: ألا أهدي لك هدية؟ إن النبي ﷺ خرج علينا فقلنا: يا رسول الله! قد علمنا كيف نسلم عليك، فكيف نصلي عليك؟ قال: فقولوا: اللهم صل على محمد، وعلى آل محمد، كما صليت على آل إبراهيم إنك حميد مجيد، اللهم بارك على محمد، وعلى آل محمد كما باركت على آل إبراهيم، إنك حميد مجيد.
Bukhari narrated it in the Book of Supplications (6357), and Muslim in the Book of Prayer (406), both through the route of Shuba, who said, "Hakam narrated to us, he said, I heard Abdul-Rahman bin Abu Layla," and he mentioned it.In another version reported by Bukhari (3370), through the route of Abdullah bin Isa, who heard Abdul-Rahman bin Abu Layla say, "Kaab bin Ujra met me and said, 'Shall I not give you a gift I heard from the Prophet ﷺ?' I said, 'Yes, give it to me.' He said, 'We asked the Messenger of Allah ﷺ, and we said, "O Messenger of Allah, how should we send blessings upon you, the people of the household, for Allah has taught us how to send greetings of peace?"'"He then mentioned it similarly, except that he added in it, "as You sent blessings upon Ibrahim," and "as You blessed Ibrahim." Hakam did not mention "Ibrahim" in his narration, but rather mentioned "the family of Ibrahim" in both places.The sahih hadiths clearly contain three wordings, "Ibrahim" alone, "the family of Ibrahim" alone, and combining the two, "Ibrahim and his family." This goes back to the narrators, some abbreviating and some giving detail, and there is nothing objectionable in it.As for his statement, "We have learned how to greet you with peace," this means what we were taught in the tashahhud, namely the words, "Peace be upon you, O Prophet, and the mercy of Allah and His blessings."