Option (D) is correct.
Explanation: Work backwards one level at a time. The owl's 30 kJ is 10% of the energy in the shrews, so the shrews hold 30 × 10 = 300 kJ. That is 10% of the energy in the grasshoppers, so the grasshoppers hold 300 × 10 = 3,000 kJ. That in turn is 10% of the food energy in the grass, so the grass holds 3,000 × 10 = 30,000 kJ. The grass converts only 1% of the sunlight on its leaves into food, so the sunlight needed is 30,000 × 100 = 3,000,000 kJ.

(A) 30,000 kJ is the food energy in the grass. It leaves out the last step: the grass captures only 1% of the sunlight that falls on its leaves.
(B) 300,000 kJ multiplies the grass energy by 10 instead of 100, treating the capture of sunlight as if it were another 10% transfer between levels.
(C) 30,000,000 kJ uses one transfer too many. From grass to owl there are three transfers (grass to grasshopper, grasshopper to shrew, shrew to owl), not four.