Buddhists do not use mantras as prayers to Hindu gods, my friend, Hindus do (in a sense, anyway. Mantra really isn't ever precisely equivalent to the Abrahamic concept of prayer).

 While the use of mantra as a form of magick and prayer *was* developed more in Tibetan Buddhism, largely because of the cultural fusion of Buddhist thought with traditional Bon shamanism of the area, mantra use in Buddhism is essentially just another object of meditation. Some forms of meditation rely on concentrating on a specific object of focus, so choosing a single thought with certain associations (such as compassion) to repeat is one way to accomplish that.

Moreover, mantra isn't really a part of "original" (at least, the closest surviving thing to original) Buddhism at all (Theravada Buddhism).