This hadith has been narrated on the authority of Malik and there is no mention of "along with the Imam" and In the hadith transmitted by 'Abdullah the words are: "he in fact finds the entire prayer".
Hadith Referenceصحيح مسلم / كتاب المساجد ومواضع الصلاة / 607
Abu Hurairah (RA) reported: The Messenger of Allah (ﷺ) said: He who finds one rak'ah at dawn before the rising of the sun, he in fact finds the dawn prayer. and he who finds one rak'ah of the afternoon prayer before sunset, he in fact finds the afternoon prayer.
Hadith Referenceصحيح مسلم / كتاب المساجد ومواضع الصلاة / 608
A'isha reported: The Messenger of Allah (ﷺ) said: He who finds a prostration before sunset or at dawn (prayer) before the rising (of the sun) he in fact finds that (prayer), and prostration implies a rak'ah.
Hadith Referenceصحيح مسلم / كتاب المساجد ومواضع الصلاة / 609
Abu Hurairah (RA) reported: The Messenger of Allah (ﷺ) said: He who finds (gets) a rak'ah of the afternoon (prayer) before the setting of the sun, he in fact gets (the full prayer), and he who gets a rak'ah of the morning (prayer) before the rising of the sun he in fact gets (the full prayer).
Hadith Referenceصحيح مسلم / كتاب المساجد ومواضع الصلاة / 609