Answer:
You fill up the 5 liter bottle. Then pour the contents from the 5 liter to the 3 liter till the 3 liter is full. Once the 3 liter bottle is full, what is left in the 5 liter bottle is 2 liters. Then you empty out the 3 liter until it matches the height of the 5 liter. Pour the remaining contents of the 3 liter bottle in the 5 liter bottle to get exactly 4 liters.