I some chicken curry earlier and Richard and Kate to stay for dinner, but just then I remembered that they were both vegetarian.

was going to cook
had been cooking
cooked
had cooked E. have cooked

The correct answer is A. was going to cook.

The sentence is in the past tense, and it is describing an event that was planned but did not happen. The only option that makes sense in this context is A. was going to cook. This option indicates that the speaker had made plans to cook chicken curry, but then changed their mind.

The other options are not as likely in this context. Option B. had been cooking indicates that the speaker had already started cooking the chicken curry, but this is not what the sentence is saying. Option C. cooked indicates that the speaker did cook the chicken curry, but this is also not what the sentence is saying. Option D. had cooked indicates that the speaker cooked the chicken curry in the past, but this is not what the sentence is saying. Option E. have cooked indicates that the speaker has cooked the chicken curry in the past, but this is also not what the sentence is saying.

Therefore, the correct answer is A. was going to cook.