Jami` at-Tirmidhi Book 42, Hadith 36
"When the Messenger of Allah (ﷺ) would give the Salam he would do so three times, and when he would say a statement, he would say it three times."
from Abu Tamimah al-Hujaimi from Jabir bin Sulaim who said: "I went to the Prophet (ﷺ) and I said: ''Alaikas-Salam (upon you be peace)' so he replied: 'Do not say "'Alaikas-Salam" rather say As-Salamu Alaik.'" And he mentioned the story in its entirety.
"The Messenger of Allah (ﷺ) was sitting in the Masjid and the people were with him when three people came. Two of them came near the Messenger of Allah (ﷺ) and one went away. When the two stopped at the Messenger of Allah (ﷺ) the said the Salam. One of them saw an opening in the circle so he sat there. As for the other one, he sat behind them, and the other one went way in the rear. When the Messenger of Allah (ﷺ) had finished, he said: 'Shall I inform you about the three people? As for one of them, he took himself to Allah so Allah took him. The other, he was shy so Allah (had mercy) on him. As for the other one, he turned away, so Allah turned away from him.'"