With a 5-litre and a 7-litre jar, the sequence is:
1. Fill the 5 and pour it into the 7.
2. Fill the 5 again and top up the 7 — you're left with 3 in the 5.
3. Empty the 7, then pour those 3 litres into it.
4. Fill the 5 and empty it into the 7 (now 8 total, so the 7 holds 7 and 1 remains in the 5).
5. Empty the 7, pour the 1 litre in, then add a full 5.
You end with 6 litres in the 7-litre jar. The trick throughout is using the smaller jar to measure remainders rather than trying to fill the big one directly.