You have a 5 gallon jug and a 3 gallon jug.
You have no other measuring devices.
Measure out exactly 4 gallons of water (Assume you have a river handy, or some other limitless water supply).
Let us denote the 3 gallon jug by A and the 5 gallon jug by B.
Step 1: Fill B with water.
Step 2: Empty B into A. Precisely 2 gallons now remain in B.
Step 3: Empty jug A.
Step 4: Pour the 2 gallons from B into A.
Step 5: Fill out B. Transfer 1 gallons of B into A.
B will now contan precisely (5-1) = 4 gallons.
Thus, we have measured out exactly 4 gallons of water as desired.