Do you have a Daily meeting where you report on your progress?
For my answer, I'll assume this is the case.
If you put in more than an hour of effort into helping with an issue that is not your current task, I would mention that on the next day:
[your own report]... and I helped Peter with XY, that also took a bit of time.
Then everybody knows, this is in a friendly tone that should offend nobody, but if Peter is annoyed by you reporting your input, well, you might not have to worry about him asking anymore. ;)
EDIT: According to OP's comment, the boss is not attending dailies. The peer pressure from the daily might already have some effect on Peter, if he feels embarrassed by needing help. If you feel like it is necessary to make this behavior visible to your boss, I'd first try to use whatever time tracking you have to correctly track the time you spent with other tasks. If that is not an option, you may be more aggressive and CC you boss as Old_Lamplighter suggests.
However, "never attribute to malice that which is adequately explained by stupidity". You should be certain that Peter has an agenda in his behavior, don't escalate if he is simply a fool.
He is not making a good case for himself, anyway. A decent boss should also recognize that someone, who is not accepting needed help when offered, is not a good candidate for promotion.