1st Soln
1. Fill the 3-liter bottle and pour it into the empty 5-liter bottle.
2. Fill the 3-liter bottle again, and pour enough to fill 5-liter bottle. This leaves exactly 1 liter in the 3-liter bottle.
3. Empty the 5-liter bottle; pour the remaining 1 liter from the 3-liter bottle into the 5-liter bottle.
4. Fill the 3-liter bottle and pour it into the 5-liter bottle. The 5-liter bottle now has exactly 4 liters.
2nd Soln
1. Fill the 5-liter bottle and pour water from it into the 3-liter bottle until it is full.
2. This leaves 2 liters in the 5-liter bottle.
3. Empty the 3-liter bottle and pour the 2 liters of water from the 5-liter bottle into the 3-liter bottle.
4. Fill the 5-liter bottle again.
5. Fill the 3-liter bottle from the 5-liter bottle. Since the 3-liter bottle had 2 liters of water, only one liter is transferred leaving exactly 4 liters of water in the 5-liter jug.