The correct answer is A. cooking.

The sentence is in the past progressive tense, which is used to describe an action that was in progress at a specific time in the past. In this case, the speaker was cooking food when the person came in.

The other options are incorrect because they do not describe an action that was in progress. Option B, cook, is in the simple present tense, which is used to describe a general action or a habitual action. Option C, cooked, is in the simple past tense, which is used to describe an action that was completed at a specific time in the past. Option D, do cook, is in the present progressive tense, which is used to describe an action that is in progress at the time of speaking.

Here is a diagram that shows the difference between the four tenses:

Tense | Description | Example ------- | -------- | -------- Simple present | General action or habitual action | I cook food every day. Present progressive | Action that is in progress at the time of speaking | I am cooking food now. Simple past | Action that was completed at a specific time in the past | I cooked food yesterday. Past progressive | Action that was in progress at a specific time in the past | I was cooking food when he came in.