There's a difference between being helpful and being a doormat. Just be aware that people will be shitty and take advantage of you if you let them.
Yeah, sure, maybe it was actually a legitimate need and a one-time thing, but that's unlikely. There are a couple ways you could have handled it better. Could have said no from the get-go, either recognizing what she was doing or that your co-worker was an awkward kid who wouldn't say no even if he wanted to. After you let her get away with it and saw how he felt about it, you should have bucked up and done all of the work that she shoved off on you and (gently) told him that he can just say that he doesn't want to next time, no hard feelings.
Letting her get away with that and then ratting to HR after the fact is about the shittiest way of handling it... but at the end of the day who gives a shit, it's small beans. So a bad co-worker might be a little passive-aggressive, sure, it's not like the sort of person who shoves work on others to skive off early was ever going to be a genuine friend or a pleasure to work with anyways. I guarantee you that she won't try to talk you into doing her work again, and probably not the kid either since HR shouldn't have told her who reported her.
There's no good way to deal with a shitty co-worker being shitty, but making it clear from the start that you're not going to enable them is probably the best.