مُسْنَدُ أَحْمَدَ
Musnad Ahmad 4050
Musnad of Abdullah bin Mas'ood
It was narrated that ‘Abdullah bin Mas'ood said: If you are not sure about your prayer, when you are sitting, and you do not know whether you prayed three or four, but you think it most likely that you prayed three, then get up and do one rak'ah, then say the salam, then prostrate twice, then say the tashahhud, then say the salam. If you think it most likely that you prayed four, then say the salam, then prostrate twice, then say the tashahhud, then say the salam.
Musnad Ahmad 4076lts isnad is da’eef because it is interrupted]