Taken from the books of tafsir ibn Kathir
When you enter the masjid say _________ and when you enter upon your family say _________ and when you enter a house in which u notice there is no one, say _________
Mujaahid said : When you enter the masjid say, “As-salaam ala Rasool-Illaah (Peace be upon the Messenger of Allaah), and when you enter upon your family, greet them with salaam, As salamu alaikum. and when you enter a house in which there is no one, say “As-salaamu ‘alayna wa ‘ala ‘ibaad-Illaah il-saaliheen (peace be upon us and upon the righteous slaves of Allaah).”
Tafseer Ibn Katheer, 3/306.
And Allaah knows best
Click here for next question