On the prohibition against being the first to greet an unbeliever and how to return their greeting

Riyad as-Salihin (The Meadows of the Righteous)

by Imam Nawawi

138. Chapter: On the prohibition against being the first to greet an unbeliever and how to return their greeting. The recommendation to greet the people of a mixed assembly of Muslims and unbelievers

866. Abu Hurayra reported that the Messenger of Allah, may Allah bless him and grant him peace, said, "Do not initiate the greeting to the Jews or the Christians. When you meet one of them in the road, force him to the narrowest part of it." [Muslim]

867. Anas reported that the Messenger of Allah, may Allah bless him and grant him peace, said, "When the People of the Book greet you, say, 'And on you.'" [Agreed upon]

868. Usama reported that the Prophet, may Allah bless him and grant him peace, passed by an assembly consisting of Muslims and some idolworshippers and Jews as well and the Prophet, may Allah bless him and grant him peace, greeted them." [Agreed upon]