Hello. I'm sorry to hear this. Three years is a very great age for a hamster. Many only get to two or two and a half. So he's doing really well. It's fairly normal for them to start losing some hair. The growth doesn't look very nice and you would need to see a vet about that. Unfortunately hamsters do get various medical things when they get older, just like humans. It might be a tumour but it might also be benign. The only way a vet can tell usually is by giving antibiotics and anti inflammatories and see if it shrinks. The anti inflammatory is also a pain relief and it can be good for them to be on that anyway when they're older as they often can have a bit of arthritis or toothache and hamsters are very good at hiding pain, being prey animals.
How is he in himself? Is he fairly active and eating and drinking ok? Walking around ok? Not sitting hunched or with his ears down? (those latter two are signs they're in pain).
Do you know if he's been biting at it at all?