The three forms of the verb "need" are: need (infinitive or present tense) / needed (simple past tense) / needed (used with the present and past perfect tenses, and includes the auxiliary verbs: have, has or had).
The past perfect verb is usually accompanied by a verb in the simple past tense, e.g., "reached".
The correct answer is B.
For example: I COOKED enough food for three people, but I NEEDED HAVE COOKED so much food because no one came and I was the only one who ate the food I cooked.