ENOfficial
Abu Hurairah reported the prophet (ﷺ) as saying: When one of you leads the people in prayer, he should be brief, for among them are the weak, the sick, and the aged. But when one of you prays by himself, he may pray as long as he likes.
Source: sunnah.com
Other translations
Arabic
حَدَّثَنَا الْقَعْنَبِيُّ، عَنْ مَالِكٍ، عَنْ أَبِي الزِّنَادِ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ " إِذَا صَلَّى أَحَدُكُمْ لِلنَّاسِ فَلْيُخَفِّفْ فَإِنَّ فِيهِمُ الضَّعِيفَ وَالسَّقِيمَ وَالْكَبِيرَ وَإِذَا صَلَّى لِنَفْسِهِ فَلْيُطَوِّلْ مَا شَاءَ " .
sunnah.com