Okay, your test is being a little pedantic. There's something called prescriptive English grammar and then there's something called descriptive English grammar. The former is "the Queen's English", shall we say, and the latter is "the commoner's English". For instance, let's take a look at your example, shall we?
"Now some people say that this sort of story has to have a happy ending, and insist that a hunter happened to be passing at that very moment (as they often do in fairy stories), and being a quick-witted sort of chap, had opened up the wolf and had rescued both the unfortunate victims before you could say 'Jack Robinson'."
Common speech would dictate that the past perfect with "before" is unnecessary; in fact, most people, when speaking, do not use the past perfect with "before" because "before" already tells the listener which event or events came first. For example:
"I had done the dishes before my mother came home"
would be said in common parlance as
"I did the dishes before my mother came home."
In your situation, you are very smart and very good at English. Your way is correct, but it's more informal; however, it's the way everyone talks! In fact, if you wrote your example in the simple past in a formal English paper, no teacher would deduct points or point out the error because it's not really an error; it's a bookish way of writing or saying it.
Now, the one commenter said it could possibly be "had opened and rescued". You could do it that way as long as you were treating "rescued" as a past participle and not a simple past since you had used the past perfect for the first one.
Your example reworded:
"The hunter had killed the wolf and gotten both the unfortunate victims medical attention before you could say 'Jack Robinson'."
In this example, we see the second event in the past uses the past participle "gotten". Most English verbs have the same past tense as they do their past participle; however, there are a few whose past participles differ from their past tenses and others wherein there are optional ones. "To rescue" has the same past participle as its past tense (i.e. "he rescued" versus "he has rescued"); therefore, it is called a weak or regular verb. This is contrasted with a strong or irregular verb like "to see" (i.e. "I saw" versus "I have seen"). "To get" can have a past participle as "gotten" or "got" ("got" is also the simple past form) and, in American English, the meaning can change if one should use "gotten" over "got" as a past participle, but that's an explanation for another time.
Back to your example now:
"The hunter had opened up the wolf and had rescued both the unfortunate victims before you could say 'Jack Robinson'."
The reason it should be "had opened up" and "had rescued" is based on the fact that these two events had occurred in the further past than "you could say 'Jack Robinson'" occurred. As you probably know by now, "could" is the simple past of "can". The conjunction "before" tells us that "you could say 'Jack Robinson'" is the most recent past event; however, the two events that had occurred before this most recent past event occurred are the hunter's opening up the wolf and his rescuing both of the victims; therefore, the past perfect should be used herein even though, in common parlance, it almost never is.
I hope that might have helped you understand the difference therein. Take care and Godspeed.