(a) It is narrated from Sayyiduna Ibn Mas'ud (may Allah be pleased with him) that if a man finds the people praying in congregation in bowing, prostration or sitting, he should say two takbirs. Imam Malik (may Allah have mercy on him) said: As for bowing and prostration, we know this ruling, but two takbirs in the state of sitting are not within my knowledge. The narrator asked: Should he begin the prayer with a single takbir and sit down? He said: Yes.
(b) Imam al-Bayhaqi (may Allah have mercy on him) said: If this narration is authentic from Sayyiduna Ibn Mas'ud (may Allah be pleased with him), it is possible that he meant this in the case of prostration, that is: he said the takbir to begin the prayer, and the imam, saying one takbir, rose from prostration and sat; the ruling for him then is that he conforms to the imam in his words of remembrance and his actions.
And likewise it would be in prostration, that is: the imam said the takbir for prostration, and he began the prayer with a single takbir and followed the imam.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2590