Correct option is D
Sonia said that she had finished her meal. This option correctly shifts the verb tense from present perfect ("I have finished") to past perfect ("she had finished") in reported speech, which is necessary when the reporting verb is in the past tense. This shift accurately reflects the change in perspective from direct to reported speech.
Grammatical rule used: In reported speech, if the reporting verb is in the past tense, then the verb in the reported clause usually shifts back one tense as well.
Example: "I am enjoying the party," she said, becomes "She said that she was enjoying the party."