How do you measure 4 liters of water using 8 liters and 5 liters?

Assuming you have a separate container to hold the 4 litres... Fill the 5 litre and empty it into the 8 litre. Repeat - and retain the 2 litres you have left when the 8 litre is full - pour that into the 'spare' container. Empty the 8 litres out and repeat the process again - you should now have 4 litres in your spare container.