The manner of raising the hands in the prayer; what should the worshipper do if he makes a mistake?
Question

I prayed, and when rising from rukoo‘ (bowing), I did not raise my hands to my shoulders or my ears; rather it was lower than that. When I realized, I corrected the position of my hands. Is my prayer valid or not?
Praise be to Allah.Firstly:
It is proven in the Sunnah that the Prophet (blessings and peace of Allah be upon him) used to raise his hands at four points in the prayer, namely: When saying the opening takbeer (takbeerat al-ihram), before bowing, when rising from bowing, and when standing up following the (first) two rak‘ahs, i.e., after reciting the first tashahhud.
This is indicated by the report narrated by al-Bukhaari (739) from Naafi‘, that when Ibn ‘Umar started to pray, he would say takbeer and raise his hands; and before he bowed he would raise his hands; and when he said Sami‘a Allahu liman hamidah (Allah hears those who praise Him) he would raise his hands; and when he stood up following the (first) two rak‘ahs he would raise his hands. Ibn ‘Umar attributed that to the Prophet of Allah (blessings and peace of Allah be upon him).
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
The points [in the prayer] at which the hands are to be raised are four: when saying the opening takbeer, before bowing, when rising therefrom, and when standing up after the first tashahhud.
End quote from ash-Sharh al-Mumti‘ (3/214).
With regard to the specific manner in which the hands are to be raised, it says in one report that they should be raised level with the shoulders, and according to another report, they should be level with the earlobes.
It was narrated that ‘Abdullah ibn ‘Umar (may Allah be pleased with him) said: I saw the Messenger of Allah (blessings and peace of Allah be upon him) when he started to pray: he raised his hands until they were level with his shoulders, and (he also did that) before he bowed and after he rose from bowing and he would say Sami‘a Allahu liman hamidah (Allah hears those who praise Him), but he did not do that when he prostrated. Narrated by al-Bukhaari (736) and Muslim (390).
It was narrated from Maalik ibn al-Huwayrith that when the Messenger of Allah (blessings and peace of Allah be upon him) said takbeer [at the beginning of the prayer] he would raise his hands until they were level with his ears, and before he bowed he would raise his hands until they were level with his ears, and when he rose from bowing and said Sami‘a Allahu liman hamidah (Allah hears those who praise Him), he did the same thing. Narrated by Muslim ((391).
Based on that, the scholars differed concerning how the hands are to be raised.
Some of them are of the view that the palms should be raised until they are level with the shoulders. This is the view of ‘Umar ibn al-Khattaab and his son, and Abu Hurayrah (may Allah be pleased with them). It is also the view of ash-Shaafa‘i in al-Umm, and of his companions, as well as the view of Maalik, Ahmad, Ishaaq and Ibn al-Mundhir, as noted in al-Majmoo‘ (3/307).
Abu Haneefah was of the view that the hands should be raised level with the ears.
According to one report from Ahmad, the worshipper has the choice between the two options, and neither of them is superior to the other. This was narrated by Ibn al-Mundhir from some of the scholars of hadith and he favoured this view.
Al-Albaani said: This is the correct view, for both options are Sunnah. This is the view to which many of our scholars are inclined, such as ‘Ali al-Qaari and as-Sindi al-Hanafi.
See: Sifat Salaat an-Nabi (sall-Allahu ‘alayhi wa sallam) by al-Albaani (1/202).
Secondly:
Raising the hands at the points mentioned during the prayer is one of the Sunnahs of prayer.
It says in al-Mawsoo‘ah al-Fiqhiyyyah (27/95): The Shaafa‘is and Hanbalis are agreed that it is prescribed to raise the hands before bowing and when rising from bowing, and that this is one of the Sunnahs of prayer. As-Suyooti said: Raising the hands is proven from the Prophet (blessings and peace of Allah be upon him) in the reports of fifty of the Sahaabah. End quote.
Not doing the Sunnahs of prayer does not affect the validity of the prayer. If a worshipper did not raise his hands throughout his prayer, that would not affect the validity of his prayer, but he will have omitted one of the Sunnahs of prayer and will be deprived of the reward thereof.
Moreover, raising the hands with some slight shortcoming in the manner of raising them, as happened in your case, is something that is less serious than omitting to raise the hands altogether.
Based on that, the minor mistake that you made in the manner of raising the hands, which you then corrected, does not affect the validity of your prayer.
Therefore our advice to you is not to worry too much about the manner of raising the hands, but if you see that your hands are not completely level with your shoulders, do not raise them a second time, because this may lead to wasswaas (intrusive thoughts or whispers from the Shaytaan) and doubts, and repeating the actions of the prayer unnecessarily, which is worse than a simple mistake in the manner of raising the hands.
And Allah knows best.