We prayed along with the Messenger of Allah (may peace he upon him) and he committed or omitted (something). Ibrahim said: By Allah, this is a misgiving of mine only. We said: Messenger of Allah, is there something new about the prayer? He (the Holy Prophet) said: No. We told him about what he had done. He (the Holy Prophet) said: When a man commits or omits (something in prayer), he should perform two prostrations, and he then himself performed two prostrations.
صَلَّيْنَا مَعَ رَسُولِ اللَّهِ ﷺ فَإِمَّا زَادَ أَوْ نَقَصَ قَالَ إِبْرَاهِيمُ وَايْمُ اللَّهِ مَا جَاءَ ذَاكَ إِلاَّ مِنْ قِبَلِي قَالَ فَقُلْنَا يَا رَسُولَ اللَّهِ أَحَدَثَ فِي الصَّلاَةِ شَىْءٌ فَقَالَ لاَ قَالَ فَقُلْنَا لَهُ الَّذِي صَنَعَ فَقَالَ إِذَا زَادَ الرَّجُلُ أَوْ نَقَصَ فَلْيَسْجُدْ سَجْدَتَيْنِ قَالَ ثُمَّ سَجَدَ سَجْدَتَيْنِ