The Messenger of Allah ﷺ used to pray two rakahs after every obligatory prayer, except for Fajr and Asr.
حدثنا محمد بن كثير أخبرنا سفيان عن أبي إسحق عن عاصم بن ضمرة
كان رسول الله ﷺ يصلي في إثر كل صلاة مكتوبة ركعتين إلا الفجر والعصر
Its chain is daif. Ahmad narrated it, 1/124, and Nasai in Al-Kubra, no. 341, from the hadith of Sufyan Thawri with this wording, and Mutarrif followed him in narrating it.Abu Ishaq was a mudallis and narrated it with "an" (without stating direct hearing). Part of the hadith has supporting evidence in Tirmidhi, no. 598, 599, and elsewhere.It is also established that Ali prayed two units of prayer after Asr, as narrated by Bayhaqi, 2/459.