mentioning Al-’Al?’i’s opinion by such a great scholar without commenting on its falsehood is an unwise act.
Let’s take a close look at both An-Nas?’i’s and Al-Baihaqi’s narrations and scrutinize them.
First: Ibn Mas’?d’s ( - رضي الله عنه -) narration:
It was narrated by An-Nas?’? in his “Sunnan”, chapter: As-Sal?t, as is mentioned in “Tuhfatul Ashr?f” (vol. 7/ p. 158), Ab? D?w?d [in his Sunnan] (no. 1028) and from the same way of narration, it was narrted by Ad - D?raqutn? (vol. 1/ p. 378), and also narrated by Al-Baihaq? (vol.2/ 336, 355 - 6) from Muhammad Ibn Salamah from Khusaif from Ab? ‘Ubaidah from his father Abdull?h Ibn Mas’?d that the prophet ( - صلى الله عليه وسلم -) said: ‘If you doubt while being in Sal?t as to whether you performed three or four Rak’?t, but you think you have performed four, recite Tashahhud, do two Suj?ds before reciting Tasl?m, then recite another Tashahhud and another Tasl?m’.
Ab? D?w?d said: ‘Abdul W?hid narrated if from Khusaif through a chained narrators that was not traced back to the prophet ( - صلى الله عليه وسلم -) , so did Sufy?n, Shuraik and Isra’il but they differed in the wording of the had?th and did not provide their chains of narrators’.
I believe that Ab? D?w?d’s statements imply that those who narrated from Khusaif differed in their chain of narrators, most of them traced it back to Abdull?h Ibn Mas’?d not to the prophet ( - صلى الله عليه وسلم -).
Ath-Thawri’s narration was documented by Abdir Razz?q in his “Musannaf” (vol. 2 / no. 314 and 3499) from Ath-Thawr? from Khusaif from Ab? ‘Ubaidah from Ibn Mas’?d that the prophet ( - صلى الله عليه وسلم -) recited Tashahhud when he did Suj?d As-Sahwu.
Abdur Razz?q also narrated it [in his Musannaf] (vol.2/no.312) and Al-Baihaq? (vol. 2/ no. 345) from the same track of narrators, with the addition of Muhammad Ibn Al-Fadl to those mentioned by Ab? D?w?d to have mentioned the had?th.