The correct option is
B couldn't have
From the sentence, we can conclude that the subjects were unable to help. Thus, the answer must indicate the inability of the subjects to help. Further, the words 'had wanted' and 'did not' indicate that the tense of the sentence is past tense. Thus, the answer must also be in past tense.
Option A is incorrect. 'may not have' indicates that there was a possibility that the subjects did not help but, they actually did. This does not indicate the required meaning and also contradicts the fact that the subjects did not help.
Option B is incorrect. 'can't have' is in the present tense and not the past tense. Thus, using it will make the tense of the sentence inconsistent.
Option C is incorrect. 'might not have' does not indicate inability but indicates a possibility that the subjects did not help. Thus, it cannot be the answer.
Option D is correct. 'couldn't have' expresses the subject's inability to help. It is also in the past tense and so it meets all the required conditions. Thus, it is correct.