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. Direct speech is found in books, plays, and quotations.
In indirect/reported speech, the exact meaning is expressed but not necessarily using the original speaker's exact words.
When we turn direct questions into direct speech, the following changes are necessary:
Tenses, pronouns, and possessive adjectives, and adverbs of time and place change as in the statements.
The interrogative form of the verb changes to the affirmative form. The question mark (?) is therefore omitted in indirect questions.
If the introductory verb is say, it must be changed to a verb of inquiry, e. g. ask, inquire, wonder, wan to know etc.
When the direct speech begins with a question word ( when, where, who, why etc) the question word is repeated in the indirect question.
Ask can be followed by the person addressed (indirect object- me)
Option D is correct as a direct question is given which needs to be transformed into reported speech. Therefore, you is changed to I , present perfect tense to past perfect tense, and the question word why is repeated.
The options A, B, and C are wrong as the above-mentioned rules were not followed.
The correct answer is D)He asked me why I had come back.