How Should Two People Praying Together Stand in Prayer?
Question

Could you tell me as to how should a follower stand (right next to slightly behind) with the Imam, if they are only two praying in congregation?
Praise be to Allah.He should stand in line with the Imam, not in front of him or behind him, but perfectly in line with him, on his right. This is how `Abdullah ibn `Abbas stood when he prayed with the Messenger of Allah (peace and blessings of Allah be upon him). 
Al-Bukhari entitled a chapter “Bab yaqumu `an yamini Al-Imam bi hidha’ihi sawa’, idha kana ithnayn” (Chapter: he should stand on the right of the Imam in line with him if they are two ).
In this chapter, he mentioned the Hadith of  `Abdullah ibn `Abbas (may Allah be pleased with him) who said: I stayed overnight in the house of my maternal aunt Maymunah, and the Messenger of Allah (peace and blessings of Allah be upon him) prayed Isha, then he came and prayed four Rak`ahs, then he slept, then he got up and I came and stood on his left, but he put me on his right and prayed five Rak`ahs, then two Rak`ahs, then he fell asleep and I heard his snoring. Then he went out for the prayer.
Ibn `Abbas (may Allah be pleased with him) also said: I came to the Messenger of Allah (peace and blessings of Allah be upon him) 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 Allah (peace and blessings of Allah be upon him) turned back to his prayer, I went back to my original position behind him. The Messenger of Allah (peace and blessings of Allah be upon him) prayed, and when he had finished his prayer he said to me, What is going on? I made you stand in line with me and you moved back. I said, O Messenger of Allah, is it right for anyone to pray alongside you when you are the Messenger of Allah whom Allah has blessed? He liked what I said and prayed that Allah would increase me in knowledge and understanding. (The Hadith was narrated by Imam Ahmad, 1/330 and classed as authentic by Al-Albani. Its chain of narrators is in As-Silsilah As-Sahihah, 6060.)
Then Al-Albani said: “From this Hadith we may understand that the Sunnah is when one man is praying alone following the Imam, he should stand alongside him on his right, not in front of him or behind him. This is the madhhab of the Hanbalis, as stated in Manar As-Sabil, 1/128.”
`Abd Ar-Razzaq narrated that Ibn Jurayj said: I said to `Ata’: If a man prays with another man, where should he stand in relation to him? He said, To his right . I said, Should he be precisely in line with him so that neither is in front of the other? He said, Yes. I said, Do you prefer that they should stand close together so that there is no gap between them? He said, Yes.
In Al-Muwatta’, it is narrated that `Abdullah ibn `Utbah ibn Mas`ud said: I entered upon Umar ibn Al-Khattab at midday and found him saying Tasbih (in the prayer). I stood behind him and he made me come closer until I was standing in line with him on his right.
Al-Hafidh said in Al-Fat-h (2/191): “Some of them narrated that there was scholarly consensus that one person praying alone with the Imam should stand to the right of the Imam.”
For more details, please see the following answers: 79 , 7718 , 8918 , and 40113 .
And Allah knows best.