Here is the answer:

Fill the 5 ltr. Jug with water and then pour 3 ltr. In the jug having capacity of 3 lts. So 5 lt jug will have 2 lts in it.
Now empty the 3 lts jug and fill these 2 lts in that. The 3 ltr jug is still having the capacity of 1 ltr more.

Again fill the 5 ltr jug with water and pour 1 ltr to 3 ltr jug. Now the 5 ltr Jug will contains 4 ltr in it.

Put these 4 ltr water in 8 ltr Jug and follow the same procedure to fill the 5 ltr with 4 ltr water.

Thanks
Punit