When a group of people pass by, it is sufficient if one of them extends the greetings on their behalf, and it is sufficient if one returns the greeting on behalf of a group

‘Ali ibn Abi Tālib (may Allah be pleased with him) reported that the Prophet (may Allah's peace and blessings be upon him) said: "When a group of people pass by, it is sufficient if one of them extends the greetings on their behalf, and it is sufficient if one returns the greeting on behalf of a group."
Good hadith - Narrated by Abu Daoud

One person is sufficient to extend the greetings on behalf of a group, just as it is sufficient that one person returns the greetings on behalf of a group.

Successfully sent!