It is Makrooh for a traveler to follow a person who is not a traveler. And it is Makrooh for a person who is not a traveler to follow a traveler in the prayers. Of course, here abominable is meant for less reward, otherwise, the congregational prayer has its reward in any case.
If the distance between the follower and the Imam or between him and another follower, who maintains connection with the Imam, is less than the size one person (one dhera) in the state of prostration, there would be no objection. However, if the gap is more than that, the jurists have different fatwas. Some scholars of the view that others' prayers turn into individual prayers (furada). However, according to the author of Urwatul Wuthqa, if those individuals, who are standing in the first row and have finished their prayers, stand up immediately and offer another prayer, others' congregational prayers would be in order.
 - For further information about the verdicts of grand religious authorities, see Tawzih al-Masail of Imam Khomeini (with connotation), vol.1, pg.804, issue No.1490.
 - Ibid, pg.774, issue No.1417.
 - Al-Yazdi, al-Sayyid Muhammad Kazem, al-Urwatul Wuthqa (with connotation), vol.3, pg.148, issue No.15, Islamic Publications Institute, Qom, 1419 A.H.