Ubayd bin Khalid reported,

The Messenger of Allah ﷺ established a bond of brotherhood between two men. One of them was killed, and the other died sometime later. We performed the funeral prayer over him, and the Messenger of Allah ﷺ asked, "What did you say in your supplication for him?"They replied, "We prayed for him, saying, 'O Allah, join him with his companion.'"The Messenger of Allah ﷺ said, "But where is his prayer after his companion's prayer? Where is his fasting after his companion's fasting? Where are his deeds after his companion's deeds? The difference between them is as vast as the distance between the heavens and the earth."Shuba was uncertain about which of the two terms, "prayer" or "deeds," was used in one of the phrases.

Ahmad 17921

Sahih

حدثنا محمد بن جعفر حدثنا شعبة عن عمرو بن مرة عن عمرو بن ميمون عن عبد الله بن ربيعة

عن عبيد بن خالد السلمي قال

آخى رسول الله ﷺ بين رجلين فقتل أحدهما ومات الآخر بعده فصلينا عليه فقال رسول الله ﷺ ما قلتم قالوا دعونا له اللهم ألحقه بصاحبه فقال رسول الله ﷺ فأين صلاته بعد صلاته وأين صومه بعد صومه وأين عمله بعد عمله شك في الصلاة والعمل شعبة في أحدهما الذي بينهما كما بين السماء والأرض

أحمد 17921صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Ubayd bin Khalid Sulami
Numbering
Darussalam 17921
Ahmad 17921