Reference: Majmoo’ Fataawa Samahatu ash-Shaykh Ibn Baaz – Volume 6, Page 116, Fatwa No.74
Question: What is the ruling concerning the one who performed Hajj on behalf of his mother and at the meeqaat he pronounced the talbiyah for the Hajj and did not do so for his mother?
Response: As long as his intention was for the Hajj on behalf of his mother, even if he forgot, the Hajj is [acceptable] for his mother since the intention is [a] stronger [argument], for that which the Prophet (sal-Allaahu ‘alayhi wa sallam) said:
«Actions are but by intention».
So if the intention in his coming was for Hajj on behalf of his mother or father and he then forgot when he entered the state of ihraam, the Hajj is [acceptable} for whoever he had intended it for, either his mother, father or other than them.