فليس بمناف لما ذكرنا من ان من تكلم عامدا وجب عليه إعادة الصلاة لان من سها فسلم ثم تكلم بعد ذلك فلم يتعمد الكلام وهو في الصلاة لانه إنما تكلم لظنه أنه قد فرغ من الصلاة فجرى مجرى من هو في الصلاة وتكلم لظنه انه ليس هو في الصلاة ولو أنه حين ذكر انه قد فاته شئ من هذه الصلوات ثم تكلم بعد ذلك عامدا لكان يجب عليه إعادة الصلاة حسب ما قدمناه في المتكلم عامدا ومن شك فلم يدر اثنتين صلى أم ثلاثا فان ذهب وهمه إلى واحد منهما بنى عليه ولا شئ عليه وان اعتدل وهمه بنى على الاكثر وأتم ما فاته إذا سلم وقد قدمنا ما يدل على ذلك ويزيده بيانا ما رواه
So this does not contradict what we have stated, that whoever speaks deliberately during the prayer must repeat the prayer, because the one who forgets and gives the ‘taslim’, then speaks afterward, did not intentionally speak while still regarding himself in a state of prayer. Rather, he spoke thinking he had completed the prayer, and this is like the case of someone who speaks during prayer believing he is not in prayer. However, if he had remembered that something from his prayer was still remaining, and then deliberately spoke after that, it would have been obligatory upon him to repeat the prayer, as we have previously clarified regarding the one who deliberately speaks. As for the one who doubts and does not know whether he prayed two rak‘ahs or three: if his assumption leans toward one of them, then he should build upon it and nothing is required of him. But if his assumption is balanced, he should build upon the greater number and complete what he has missed after giving the ‘taslim’. We have already mentioned what supports this, and what further clarifies it is what was narrated: