The given sentence is missing a main verb. Thus, the answer must be a verb.
Option A is incorrect. According to the rules of usage, in an interrogative sentence, the pronoun has to directly precede the verb. Even if there is an auxiliary involved, it will come before the pronoun. In 'did cook' the auxiliary is between the pronoun and the verb and so, it is grammatically incorrect.
Option B is correct. 'cooked' is a complete verb and also fits properly in the sentence. It has no grammatical errors and so it is the correct answer.
Option C is incorrect. According to the rules of usage, in an interrogative sentence, the pronoun has to directly precede the verb. Even if there is an auxiliary involved, it will come before the pronoun. In 'was cook' the auxiliary is between the pronoun and the verb and so, it is grammatically incorrect.
Option D is incorrect. According to the rules of usage, in an interrogative sentence, the pronoun has to directly precede the verb. Even if there is an auxiliary involved, it will come before the pronoun. In 'is cooked' the auxiliary is between the pronoun and the verb and so, it is grammatically incorrect.