Reference: Majmoo’ Fataawa wa Rasaa.il ‘Abdul-‘Azeez ibn Baaz – Volume 16, Page 402
Question: What is the ruling of [performing] hajj on behalf of both parents who have died without [themselves] having performed hajj?
Response: It is permissible for you yourself to perform hajj on behalf of your parents, and [likewise] to appoint someone [else] to perform hajj on their behalf – so long as you have [already] performed hajj on behalf of yourself, or the person whom you have appointed to do hajj on their behalf has [already] performed hajj on behalf of himself. [This is] based upon what ‘Abdullaah ibn ‘Abbaas (radhi-yAllaahu ‘anhumaa) narrated from the hadeeth of Shubrumah.
‘Abdullaah ibn ‘Abbaas reported that the Messenger of Allaah (sal-Allaahu ‘alayhi wa sallam) heard a man saying:
“Labbayka ‘an Shubrumah ([I am] at your service O Allaah, on behalf of Shubrumah).” The Messenger of Allaah (sal-Allaahu ‘alayhi wa sallam) said:
«Who is Shubrumah?»
He said: “A relative of mine.” The Prophet (sal-Allaahu ‘alayhi wa sallam) said:
«Have you [ever] done Hajj before?»
He said, “No.” He (sal-Allaahu ‘alayhi wa sallam) said:
«[First] do Hajj for yourself, then do Hajj on behalf of Shubrumah» – transmitted by Abu Daawood – no.1811 and Ibn Maajah – no.2903