Questions & Answers about Треба думати.
думати is the imperfective infinitive, focusing on the ongoing process of thinking (“need to be thinking” or “need to think”).
подумати is the perfective infinitive, indicating a completed or single act (“need to give it some thought,” “need to think about it once”).