The correct answer is A. I asked him why he was working so hard.
The other options are incorrect because they use the wrong tense. In the sentence “I said to him, ‘Why are you working so hard?'”, the verb “said” is in the past tense. This means that the speaker is talking about something that happened in the past. The other options use the present tense, which is not correct in this context.
Option B, “I asked him why was he working so hard”, is incorrect because it uses the wrong form of the verb “to be”. The correct form of the verb “to be” in the past tense is “was”.
Option C, “I asked him why he had been working so hard”, is incorrect because it uses the past perfect tense. The past perfect tense is used to talk about something that happened before another event in the past. In the sentence “I said to him, ‘Why are you working so hard?'”, the speaker is not talking about something that happened before another event in the past. Therefore, the past perfect tense is not correct in this context.
Option D, “I asked him why had he been working so hard”, is incorrect because it uses the wrong form of the verb “to have”. The correct form of the verb “to have” in the past tense is “had”.
In conclusion, the correct answer is A. I asked him why he was working so hard.