If someone comes in the room while you're cooking what are they hoping to do?
cooked food get food having dinner
get food
"cooked food" is past tense, so that one doesn't apply, and "having dinner", can't be right either, so this option must be right.
while you're cooking