Reasons for Sujud As-Sahw
Sujud as-Sahw in prayer is prescribed for three reasons: 1- Doing something extra, 2- Omitting something, 3- Being uncertain. Sujud as-sawh should be done before the salam if you have omitted one of the obligatory parts or you are not sure how many rak`ahs you have done. Sujud as-sahw should be done after the salam if you have added something extra or you are not certain but one of the two choices seems more likely to be the case.
193,854