Thanks everyone for your comments.
Looking at the picture in the TX35 link, that whole thing is what I want to replace. In that picture, the bottom gear is the one that has 15T on it. The top gear is the one that has several teeth broken off it, but I want to replace the entire assembly, not just the gear. This is based on it having got caught in the spokes, although visibly it looks OK.
The “kind of works” comment is due to the broken teeth. With the chain lined up with that gear, it stays on and the bike is ride-able, but trying to shift it, as you might expect, the chain jumps off that gear. I hadn’t considered replacing just the gear, since the whole assembly is just 10 to 15 dollars. ETA: although, if the gear weren’t broken, I’d have him try it for a while to see how well it still works.
The rear wheel has seven gears (is this the “cassette”?).
I guess I’m surprised this is that hard. It’s held on by a single Allen wrench screw, and the gear shift cable. I already took the screw all the way off, and re-assembled it. Maybe threading the chain is hard? I do have a gadget for taking apart the special link in the chain, if that would make it easier. I realize there are several adjustment screws.
This isn’t a high-end bike, it’s a Schwinn SX 2000 mountain bike, possibly bought at Target. He’ll probably outgrow it in a year or two.
I searched for “Schwinn SX2000”, but they all seem to be women’s bikes. Here’s one at Amazon, and if you zoom way in on the back wheel, that’s what our derailleur looks like, and what the attachment looks like: one screw holding it in place. There’s a bit that catches on the frame, to keep the whole assembly from rotating. That bit is still there, it didn’t get wiped off. I suspect that screw came loose, causing the accident.