Here's an ideato help start you out withon how to go about this...
If you fill the 3 gal containerthen empty it into the 5 gal, you now have 3 gallons of water inside the 5 gal container. It doesn't have to happen with this exact sequence as a starting pointbut if it did, how would you obtain the missing gallon to add to the existing 3 to make the 4 that you need?
This is life or death now guys. C'mon, think and live or don't and die!!!