The Rules of Forgetfulness (Sahw) in Prayer
Man Lā Yaḥḍuruh al-Faqīh|Volume 1|Book 1|Chapter 50
وَ رَوَى عَنْهُ عَمَّارٌ: «أَنَّ مَنْ سَلَّمَ فِي رَكْعَتَيْنِ مِنَ اَلظُّهْرِ أَوِ اَلْعَصْرِ أَوِ اَلْمَغْرِبِ أَوِ اَلْعِشَاءِ اَلْآخِرَةِ ثُمَّ ذَكَرَ فَلْيَبْنِ عَلَى صَلاَتِهِ وَ لَوْ بَلَغَ اَلصِّينَ وَ لاَ إِعَادَةَ عَلَيْهِ.
Ammar narrated: "Whoever gives the salutation (taslim) after two rak'ahs of the Dhuhr, Asr, Maghrib, or Isha prayers, and then remembers, should continue with their prayer, even if they reach China, and there is no need for them to repeat it”.
- Ṣaḥīḥ al-Faqīh