I think you are saying that you have a 10 liter can filled with water, an empty 7 liter can, and an empty 3 liter can. You want to end up with exactly 5 liters in the 10 liter can and 5 liters in the 7 liter can.
Contents after instruction Instruction
10L 7L 3L Start
10 0 0 Fill 7 from 10
3 7 0 Fill 3 from 7
3 4 3 Empty 3 into 10
6 4 0 Fill 3 from 7
6 1 3 Empty 3 into 10
9 1 0 Empty 7 into 3
9 0 1 Fill 7 from 10
2 7 1 Fill 3 from 7
2 5 3 Empty 3 into 10
5 5 0
John

My calculator said it, I believe it, that settles it