First of all, that's a nightmare of an English test. The formatting is atrocious, and the words all blend together. The writer flips back and forth between various tenses in the story, making it difficult to anticipate which answer choice would be "correct" for the given context.
In addition there are a number of odd word choices and grammatical errors which compound the confusion. For example, the first use of "had listened" in the original is bizarre, since there is no overarching action to relate it to. She "had listened" before doing what? It's not clear.
For these reasons I can't tell you the answer for this particular question. But, this is how I might have written this part of the passage:
She listened to her beloved husband's words, feeling like she was in a bad dream. When he had finished, Mary went to her kitchen, like a robot, to get their meal ready.
In the second case "had finished" is appropriate because that action happens before another action. First he finishes talking, then she goes to the kitchen. However it would be fine to use the simple past "finished", because finishing is a discrete action that takes no time.
When he finished, Mary went to her kitchen.
By the way, these characters are from a macabre short story "Lamb to the Slaughter" by the author Roald Dahl. It's delightfully black humor, but you should find it much easier to understand than this horrible mess.