All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
It is permissible for a praying person to say in his Tashahhud “Assalaamu ‘Alayka Ayyuha An-Nabiyy” (As-Salaam on you, O Prophet) while addressing the second person singular, or to say: “Assalaamu ‘Ala An-Nabiyy” (As-Salaam on the Prophet), both wordings were said by the Companions .
With regard to the first wording, ‘Abdur-Rahmaan ibn ‘Abdul-Qaari’ narrated that he heard ‘Umar ibn Al-Khattaab when the latter was on the Pulpit teaching people the Tashahhud, saying: “Say: “At-Tahiyyaatu Lillaah … As-Salaamu ‘Alayka Ayyuha An-Nabiyy wa rahmatu Allaahi wa barakaatuhu.” [addressing the second person singular][Maalik]
As regards the second wording, Al-Bukhari reported that Ibn Mas’ood mentioned the Tashahhud with the wording “As-Salaamu ‘Alayka Ayyuha An-Nabiyy and then he said: “When he [] died we used to say: ''As-Salaamu, meaning, Assalaamu ‘Ala An-Nabiyy (As-salaam on the Prophet ).
Ibn Baaz said: “If someone says: “As-Salaamu ‘Ala An-Nabiyy wa rahmatu Allaahi wa barakaatuhu”, then this is acceptable, but it is better for us to say what the Prophet used to teach the Companions to say: “As-Salaamu ‘Alayka Ayyuha An-Nabiyy wa rahmatu Allaahi wa barakaatuhu” as this is what the Prophet taught his nation and he died upon this.”
Allaah Knows best.