Sayyidina Abu Huraira (RA) reported on the authority of the Prophet (SAW) that salaam should be offered by the rider to the pedestrian, the pedestrian to the one who is seated, and a fewer number to a larger group. And, Ibn Muthanna added in his hadith: And the young should salute the old.
[Ahmed 10630, Bukhari 6231, Muslim 2160, Abu Dawud 5198]