If you’re in Richmond and the weather’s nice, Kew Gardens is excellent with kids that age – apart from the hot houses it’s also got an indoors playground, kid-friendly restaurant, etc. And it’s a lovely walk back down the towpath after. (Or 5 minutes on a double-decker bus, depending on how tired you/they are).
Up in London the above-mentioned Science and NH Museums are probably the best bet, there’s also the Zoo if the 5 year old is keen on animals. The Tower of London isn’t bad with kids, lots of armour and the Crown Jewels are quite impressive. You could then take a boat back to Westminster which would be fun.
Personally I’d avoid Hamleys with kids, as they’ll want everything and might not understand “no”… YMMV on that one 🙂