Wa `alaykum As-Salamu wa Rahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
Dear brother in Islam, may Allah reward you abundantly for your interest in knowing the teachings of your religion, Islam! We thank you very much for having confidence in us and hope our efforts, which are purely for Allah’s Sake, meet your expectations.
With regard to your question, Sheikh Sayyed Sabiq states in his well-known book Fiqh Us-Sunnah:
If a sick person recovers after someone has performed Hajj on his behalf, he will be considered as having performed his obligatory duty, and he will not be required to repeat it, for it would imply the obligation of performing two obligatory pilgrimages (rather than one). This is Imam Ahmad’s view.
The majority of scholars are, however, of the view that such a substitutory Hajj will not suffice a man to absolve him of his obligation, for his recovery shows that his case was not really hopeless (and he should therefore repeat it), for the decisive factor in this respect is cessation of illness and restoration of his health.
Ibn Hazm is inclined to the first view. He says: “When the Prophet (peace be upon him) commanded to perform Hajj on behalf of those who are unable to walk or ride (i.e., cannot travel for Hajj), and told that this will pay off their debt to Allah, then indeed the debt is settled, and their effort accepted.” And surely if an obligation is removed or fulfilled, there is no justification for its repetition, especially when there is nothing in the texts to support it. Had such a repetition been necessary, the Prophet (peace be upon him) must have clearly mentioned it, but as he did not, there is no reason for its repetition.
Almighty Allah knows best.