Write in reporting speech:
The two ways of relating what a person has said are 1)direct and 2)indirect (reported speech).In direct speech, the original speaker's exact words are repeated. In indirect/reported speech, the exact meaning is expressed but not necessarily using the original speaker's exact words. Pronouns and possessive adjectives usually change from first or second person to the third person except when the speaker is reporting his own words. Sometimes a noun can be inserted to avoid doubt.
When we turn direct questions and exclamations into indirect speech, they are converted to affirmative statement .( ? and ! is not used).
Option A is correct as when we convert the given direct sentence to indirect speech, to is added , the introductory verb advised is used (let), wants is changed to wanted.
The other options are wrong as that, wants, and had wanted can't be used.
The correct answer is A)My friend advised me to let him do what he wanted.