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).
All you have to do is fill the 5 gal and then using that, fill the 3 gal.. Then you will have 2 gal in the 5 gallon container. Dump that out and repeat. 2+2=4, of course.