Option C Ian the correct answer because ‘was’ isn’t the past tense of is, hence ‘he was cooking’ the dinner is correct.
Option D is incorrect because ‘while he have cooked the dinner’ is incorrect.
While signifies that an action was being performed (cooking was being done) hence it is incorrect .
Option B Ian incorrect because will is in the future tense, while the statement isn’t.
Option A is incorrect because although ‘cooked’ is the past tense, but since ‘while’ is being used, it signifies an action being performed.