Sounds like he was nervous and stressed. Things we have to consider with baby snakes is that we are HUGE monsters to them, so it is not uncommon for them to strike to defend themselves. I can't explain why he tried to strike just then. Snakes have incredible sense of smell, and something on you may have triggered a feeding response even if you washed or not.
He may have been incredibly stressed out from his time spent with your daughter. Snakes are not domesticated by any means, and what we may perceive as curiosity and exploring, may be in fact stress related, and him trying to find a safe comfortable spot to hide.
Maybe next time, don't keep him out for so long, maybe a half an hour, and put him back. It's great that he's eating, putting him 5 days is a good idea.