Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
malik:3-60Mālik > Saʾal Ibn Shihāb And Nāfiʿ a freed slave of Ibn ʿUmar

Yahya related to me from Malik that he asked Ibn Shihab and Nafi, the mawla of Ibn Umar, whether a man who joined an imam who had already done a raka should say the tashahhud with the imam in the second and fourth rakas, even though these were odd for him? They said, "He should say tashahhud with him." Malik said, "That is the position with us."  

مالك:٣-٦٠وَحَدَّثَنِي عَنْ مَالِكٍ أَنَّهُ سَأَلَ ابْنَ شِهَابٍ وَنَافِعًا مَوْلَى ابْنِ عُمَرَ

عَنْ رَجُلٍ دَخَلَ مَعَ الإِمَامِ فِي الصَّلاَةِ وَقَدْ سَبَقَهُ الإِمَامُ بِرَكْعَةٍ أَيَتَشَهَّدُ مَعَهُ فِي الرَّكْعَتَيْنِ وَالأَرْبَعِ وَإِنْ كَانَ ذَلِكَ لَهُ وِتْرًا فَقَالاَ لِيَتَشَهَّدْ مَعَهُ قَالَ مَالِكٌ وَهُوَ الأَمْرُ عِنْدَنَا