English treats words like "hardly," "scarcely," and "barely" as built-in negatives, even though they don't contain the word "not." Saying "I hardly know him" already means something close to "I almost don't know him." Because of this hidden negative meaning, none of these words should ever appear alongside another negative marker such as "not" or a negative contraction like "hadn't," "wasn't" or "couldn't." Stacking two negatives together is the double-negative error.
In the given sentence, "The sun hadn't hardly set" pairs the negative contraction "hadn't" with the already-negative "hardly." Removing the extra negative fixes it: "The sun had hardly set when the mosquitoes began to sting..."
This faulty combination sits entirely inside the first underlined chunk, "The sun hadn't hardly," which corresponds to option (a). Everything from "set when the mosquitoes began to sting" onward is grammatically sound, so the answer is (a).