It is narrated from Ibn Abbas (may Allah be pleased with him) that the Messenger of Allah (peace be upon him) passed by a woman who was in a palanquin. It was said to the woman: "This is the Messenger of Allah (peace be upon him)." She took hold of her child's arm and said: "Is his Hajj valid?" The Prophet (peace be upon him) replied: "Yes, and the reward is for you."
Hadith Referenceمسند الإمام الشافعي / كتاب الحج / 939
Hadith Takhrijصحیح أخرجہ النسائی، مناسک، باب الحج بالصغیر (2650)۔