I had both growing up, and have to say I was able to do a lot more with my guinea pigs when I was younger then I could my hamsters. Guinea pigs squeak but it's not unbearably loud and it's the most adorable sound EVER, they love to squeak at plastic bags because they think it means food! Guinea pigs are also, I think, better pets as they're awake during the day. They do go to the bathroom a lot, and do need bigger cages. But on the whole, I have to say a guinea pig would be better for a kid to have as a pet
And they can live 12 years or so, as opposed to hamsters who have a way too short lifespan unfortunately