In the film, 'Die Hard - With A Vengeance', Bruce Willis's and Samuel L Jackson's characters are given riddles to solve by bad guy, Jeremy Irons.
Many of the riddles are not worthy of mention here except perhaps, the one where they have to measure precisely 4 gallons of water using just two containers, one of 3-gallons and the other of 5-gallons capacity!
The solution offered in the film seems rushed and a bit ambiguous, so I wouldn't bother watching it right now! (And in any case, that would be cheating, wouldn't it?)
But I can tell you that there are two methods of achieving the 4-gallon goal!
Over to you!