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.