The correct answer is: B. am going to cook
The sentence "Why have you bought so many ingredients?" is asking about the reason for the action of buying ingredients. The answer "Because I am going to cook a meal for two people" provides the reason for the action. The verb "am going to cook" is in the future tense, which is the most appropriate tense to use when talking about a future event.
The other options are not as appropriate because they do not express the idea of a future event. The verb "cook" is in the present tense, which would be used to talk about a habitual action or an action that is happening at the moment. The verb "will cooking" is in the future progressive tense, which would be used to talk about an action that will be happening at a specific time in the future. The verb "had cook" is in the past perfect tense, which would be used to talk about an action that happened before a specific time in the past.
In conclusion, the correct answer is "B. am going to cook" because it is the most appropriate tense to use when talking about a future event.