These seem pretty challenging for a 5 year old. I am pretty sure if I was interviewing senior engineers this would stump them - and I would get walk outs: https://i.imgur.com/lRfEQOs.png (from his book).
The solution became immediately obvious to me after reading your comment. This leads me to believe that the question isn’t testing for math ability nor intelligence. It just requires you to realize the trick. Maybe it tests for creativity / lateral thinking ability?
It is not a trick so much as thinking what kinds of operations can be done with these vessels and water. Not necessarily a good interview question, but may be a good discussion with a young student.
random1538 didn't say what kind of engineers they were hiring, but if it was software engineers I'd be confused by it too. I know the solution to the problem, but only because I've seen it before and thus know the method to solve it.
If they were hiring cooks / chemists / anyone that is expected to have experience with measuring liquid volumes, it might make sense to assume they have the experience needed to solve this problem.
The search tree for that isn’t very wide. At every step, there are at most 6 things you can do: fill vessel A/B from the tap, empty vessel A/B in the sink, fill up vessel A/B from vessel B/A.
That sounds bad, but most of them return you to earlier states.
‘Drawing’ a transition graph until you hit a solution in your head can be done in less than a minute. On paper, it shouldn’t take more than 2.