The Messenger of Allah ﷺ said, "When one of you leads people in prayer, let him keep it brief, for among them are the weak, the sick, and the elderly. But when one of you prays alone, let him prolong it as he wishes."
أن رسول الله ﷺ قال: إذا صلى أحدكم بالناس فليخفف، فإن فيهم الضعيف والسقيم والكبير، وإذا صلى أحدكم لنفسه فليطول ما شاء.
Malik narrated it in the chapter on congregational prayer (13), from Abu Zinad, from Araj, from Abu Hurairah, and he related it.Bukhari narrated it in the chapter on adhan (703), from Abdullah bin Yusuf, from Malik, with the same wording.Muslim narrated it in the chapter on prayer (467), through the route of Mughira bin Abdul-Rahman Hizami, from Abu Zinad, with the same chain, adding in it, "for among them are the young." He also narrated it through other routes from Abu Hurairah, and in some of these routes it reads, "for among them are those with needs."