You have infinite amount of water.Your have given two jars one is of 3 liters and second is of 5 liters.
Task :- you have to calculate 4 liters of water in jar;
My answer is:
fill 3L jar and pour it in 5L jar
fill 3L jar again and pour it in 5L jar to make it full so 3L jar has 1L water in it.
empty 5L jar, pour 1L water from 3L jar in 5L jar
Fill 3L jar and pour it in 5L jar now we have 4L water in 5L jar
First fill the 5L jar.
Then fill the 3L jar from the water in 5L jar
Now the 5L jar contains 2L of water
Empty the 3L jar and fill it with the 2L of water in 5L jar
Fill the 5L jar
Add 1L of the water from 5L jar to 3L jar (because 3L jar contains only 2L of water)
Now you have 4L of water in the 5L jar.