Помочь -one time action
Помогать- more or less long action. there is no other difference here
From that context does not follow that the help did not occur . I could be asked by someone like - why have i been so long from my friend - Нужно было ему помочь или нужно было ему помогать - meaning i have taken my hand to him.
in another feature , it could be regret that someone did not help to him, no meaning if to use Помочь или помогать in that pattern
In this situation the meaning is the same, though "помочь" seems to sound more natural.
Try to search for lessons about imperfective / perfective verbs in Russian, those would help you to answer your question.
"помочь" is perfective, "помогать" is imperfective.
If you write something like "Я помог ему" it would mean "I have helped him". However, if you write "Я помогал ему" it would mean some continuous action ("I was helping him") and not necessarily completed.
If you have any questions, you can write me whenever you want.