After Jama’ah ended I could not remember at all whether I missed a Rakah or not, the person next to me who joined the salah at the same time as me didn’t make up any rakah, so I didn’t either. Should I have done Sujud As sahw right after the Imam gave salam and if I didn’t should I repeat the Salah?

Ustadh AbdulAziz al-Haqqan
Imam Ibn Bāz (may Allah have mercy on him) said: It is obligatory for a Muslim, in such cases, to act based on certainty. So if he is unsure whether he caught one rak‘ah (unit of prayer) or two with the imām, he should assume it was one rak‘ah, then complete his prayer and perform two prostrations of forgetfulness (sujūd al-sahw) before the taslīm (saying salām). And if he doubts whether he prayed two or three rak‘ahs, he should assume it was two, complete his prayer, and again perform two prostrations of forgetfulness before the taslīm. This is based on the authentic ḥadīth of Abū Sa‘īd (may Allah be pleased with him), in which the Prophet ﷺ said: > “If one of you doubts in his prayer and does not know how many he prayed — three or four — then let him cast away the doubt and act upon what he is certain of, then perform two prostrations before he says salām. If he prayed five, they will make his prayer even, and if he prayed exactly four, they will be a humiliation for Shayṭān.” (Muslim in his Ṣaḥīḥ). Based on this, you must repeat the prayer mentioned, because it was not performed in the correct manner. Your imitation of the person who entered the prayer with you cannot be relied upon. May Allah grant everyone success in what pleases Him.