You fill the 5-litres jug, and pour it into the 3-litres jug until it's full (now you have 2 litres in the 5-litres jug). Then, you pour out the 3-litres jug completely. Now, you pour the 2 litres from the 5-litres jug into the 3-litres jug. Lastly, you fill the 5-litres jug and pour it into the remaining space of the 3-litres one (one more litre). Now you're left with 4 litres in the 5-litres jug.