They _________ for such an outcome; it indeed ____________ them by surprise.
had bargained, took
The sentence talks about a past event where the people did not prepare or expect the outcome. Thus, we use the past perfect tense ("had not bargained") to indicate something that did not happen before the expected event. The second part of the sentence describes the surprise which is in the simple past tense ("took"), indicating that the surprise happened after the lack of preparation.
Hence, the correct choice is option (a): had not bargained, took.
Placing the two events described in the sentence on a timeline clarifies which happened first and which happened second, since English requires the earlier of two past events to be marked with the past perfect tense while the later one takes the simple past.
Only option A correctly sequences an earlier past-perfect action of not preparing with a later simple-past reaction of surprise.
Hence, the correct answer is Option A.