if someone is looking back when performing solah through the glass in his front
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The prayer of one who looks at people’s reflection in the mirror is valid and is not invalidated by such looking. However, Sunnah indicates that it is disliked for the worshiper to pray with something in front of him that distracts his concentration in prayer. Aishah said: “The Messenger of Allah prayed in a Khamisah (garment) that had markings on it. He looked at its markings once, when he finished his prayer, he said: ‘Take my Khamisah this to Abu Jahm, it distracted me in my prayer.”
Imam An-Nawawi said in his explanation of Sahih Muslim: in it is evidence of urging the presence of the heart in prayer, and ponder what we mentioned, preventing what distracts the concentration, and removing what might busy the heart. And it is also evidence of disliking ornamenting the mosque niche (Qibla), its walls, and similar distracting things because the Prophet made this meaning the reason for getting rid of the Khamisah.
He also said in his book Al-Majmoo' that it is disliked that one prays while another man or woman is in front of him, in his Qibla direction, and he can see him. Omar ibn Al-Khattab and Uthman ibn 'Affan disliked that because it usually keeps the heart busy, therefore it was disliked as it was disliked to look at what distracts him like a garment that has markings, and raising the sight towards the sky and similar acts mentioned in authentic Hadeeths. [End of Quote]
Primarily if what distracts him exists in Qibla’s direction, Ibn Qudamah said in (Al-Mughni): Mujahid said: “Abdullah ibn Omar, used to remove anything which was between him and the Qiblah, such as a sword or anything else. It was narrated by al-Khallal. Imam Ahmad said: Nothing should be written in the mosque niche because it distracts the heart of the worshipper, it may keep him busy by reading it rather than concentrating on his prayer. Also, it is disliked to be ornamented or place anything that might distract the worshippers.
Allah knows best.
You can search for fatwa through many choices