Thus addressed, Hanuman said unto Bhimasena, ‘From fraternal feeling and affection, I will do good unto thee, by diving into the army of thy foes copiously furnished with arrows and javelins. And, O highly powerful one, O hero, when thou shalt give leonine roars, then shall I with my own, add force to shouts. Remaining on the flagstaff of Arjuna’s car will I emit fierce shouts that will damp the energy of thy foes. Thereby ye will slay them easily.’ Having said this unto Pandu’s son, and also pointed him out the way. Hanuman vanished at that spot.”
In plain words: Hanuman promises to help Bhima out of brotherly love. In battle he will sit on the flag of Arjuna's chariot and roar along with Bhima's roars, scaring the enemy so the Pandavas can defeat them easily. Then he shows Bhima the way and disappears.