Answer:
See below.
Step-by-step explanation:
You fill the 5 gallon up to the top then you pour 3 gallons into the 3 gallon jug, leaving 2 gallons in the bigger jug.
You throw the contents of the 3 gallon jug away then transfer the 2 gallons from the bigger jug into the 3 gallon jug. So you have 2 gallons in the 3 gallon jug.
You then fill the 5 gallon jug and pour 1 gallon into the 3 gallon jug, so you are left with 4 gallons of water in the 5 gallon jug.