I agree with Digital. It could be a battery issue, charger related or combination of both.
You have to be careful about using chargers from different brands of phones. Different phones can have varying power requirements. The HTC charger may not be able to supply the Razr with enough current, causing the charger to work harder and possibly over heat, further reducing the output of the charger.
Incorrect current flow can also damage the phone, battery or both. Not saying this has happened, but it is a possibility.
I would start by trying to use the charger for the Razr. After that, try a new battery.