easy u noob pour everything into a 5 gallon and then pour the 5 gallon into the 3 gallon
u will have 2 gallons remaining in the the 5 gallon jug (5-3) = 2
repeat and u will have 4
unless u only have those two jugs
then u empty out the 3 gallon jug and then pur the 2 gallons u have in the 5 gallon jug in the 3 gallon jug, then refill the 5 gallon jug and then try to refill the 3 gallon jug with the 5 gallon only 1 gallon will be able to go onto the 3 gallon one (because it had 2 gallons to begin with) and thus (5-1) = 4