I think at 10 years old a kid can make a logical extension of self. "If I need food and water, so does the dog in our backyard." He might not make the connection, without being told, that if the kid needs medication for a cold, maybe the dog needs medication so he doesn't get heartworms or other worms. Plus he might have noticed the dog wasn't feeling well, looked bad, but had no means with which to get care for him. He can't drive, has no money of his own, and if his parents were allowing this to happen, they might not have listened to his pleas to take the dog to a vet. He recognized the dog and asked if he could visit, which tells me he cares for the dog at some level. Without knowing more it's hard to say what his level of involvement was.
Regardless of all that - every animal control officer, vet, cop, EVERYWHERE, will say that a child (legally defined as under 18 years old) cannot legally own a dog nor be held responsible for its care. The person who IS responsible is the adult(s) of the household -- namely the boy's parents. Pretend the boy doesn't exist for now - the ones you really want to yell at are the parents who SHOULD have seen what was happening and take care of it. I don't personally buy the "I wasn't taught to take care of a dog" -- often times it's common sense. If you're feeding a dog and it's getting skinnier, it's sick. Take it to a vet. If it's walking funny, check the nails. You don't like to have long nails, neither do they. Etc -- and if you're not sure -- ask someone with more experience. A friend, a vet, something.
In terms of legality, you're in the clear, obviously. You don't even need to tell the parents that YOU were the ones that took Rocky to the shelter and then adopted him from it. You can say "We adopted him from the shelter. Here are copies of our legal paperwork. If you disagree, go talk to the shelter about their policies." At that point, the shelter can react appropriately (i.e. press charges for cruelty) if the people do show up there. I wouldn't say anything about "oh his life was so terrible before, isn't it good he's safe now?" It'll just make them mad. Say that it's a bit of a coincidence you live so close. If the parents say something like "Oh, he's a good dog, we just didn't have time/money for him." You can say, "I'm sorry to hear that. It must have been hard. Look, your son can visit him every now and then and play with him, make sure he's happy." If you're comfortable doing so, of course. Maybe offer to meet at a local park for a run-around time every few weeks if you don't want them at your house.