Firstly pour milk with 3 litr can into 10 litre can. then the big can will contain 3 litres. after that place the 7 litre can rightly up the 10 l can so that the overflow of milk gets in to 10 litre can. pour three cans of 3litre can into 7 litre can. now with two cans the 7 litre can will be filled but there will be space for only 1 litre of milk in 7 litre can. if we will again pour a 3 litre can into 7 litre can remaining 2 litre will overflow and get into 10 litre can. it was firstly filled with 3litre now litre are added as overflow hence we got 5 litre of milk.