Narrated Al-Hasan:from Abu Hurairah that the Prophet (ﷺ) said: "The rider gives the Salam to the walking person, and the walking person to the sitting person and the few to the many." Ibn Al-Muthanna added in his narration: "And the young one gives the Salam to the elder"
SahihSahihSahihBook 42 · Hadith 16