Imaam al-Bukhaaree (d.256H) – rahimahullaah – has a chapter in his Saheeh entitled, “Chapter: He must stand at the right of the Imaam in line with him if they are two.” (Baab: Yaqoomu ’an yameenihil-Imaam bi hidhaa‘ihi sawaa‘ idhaa kaanaa ithnayn).
Within this chapter, Imaam al-Bukhaaree mentions the hadeeth of ’Abdullaah Ibn ’Abbaas (radiyallaahu ’anhu) who said, “I stayed overnight at the house of my maternal aunt Maymoonah, and the Messenger of Allaah (sallallaahu ’alayhi wa sallam) prayed ’Ishaa‘, then he came and prayed four raka’aat (units), then he slept, then he got up and I came and stood at his left, but he put me at his right and prayed four raka’aat, then two raka’aat, then he fell asleep and I heard his snoring. Then he went out for the Prayer.”
Additionally, Ibn ’Abbaas (radiyallaahu ’anhu) also said, “I came to the Messenger of Allaah (sallallaahu ’alayhi wa sallam) at the end of the night and prayed behind him. He pulled me until I was in line with him, and when the Messenger of Allaah (sallallaahu ’alayhi wasallam) turned back to his Prayer, I went back to my original position behind him. The Messenger of Allaah (sallallaahu ’alayhi wa sallam) prayed, and when he had finished his prayer he said to me, “What is with you? I made you stand in line with me and you moved back.” I said, “O Messenger of Allaah, is it right for anyone to pray alongside you when you are the Messenger of Allaah whom Allaah has blessed?” He liked what I said and prayed that Allaah would increase me in knowledge and understanding.”
Imaam Muhammad Naasirud-Deen al-Albaanee (d.1420H) – rahimahullaah – commented upon thishadeeth saying, “From this hadeeth we have understood that the Sunnah is when one man is praying alone following the Imaam, that he must stand alongside him at his right, not in front of him or behind him. This is the madhhab of the Hanaabilah, as stated in Manaarus-Sabeel (1/128).”
And al-Haafidh Ibn Hajr (d.852H) said, “Some of them narrated that there was a scholarly consensus that one person praying alone with the Imaam should stand to the right of the Imaam.”
Prepared by the Sunnah Publishing Editorial Staff
 Saheeh: Related by Ahmad in al-Musnad (1/330), and it was authenticated by al-Albaanee inSilsilatus-Saheehah (no. 6060). Refer to Silsilatus-Saheehah (no. 6060) of al-Albaanee. Refer to Fathul-Baaree (2/191) of Ibn Hajr.