Determine how you could use a 5-unit jar and a 7-unit jar to measure and hold 8 units.
Fill up the 5 unit jar.
Pour it into the 7 unit jar.
There is now room in the 7-unit jar for 2 more units.
Fill the 5-unit jar again.
Finish filling the 7-unit jar from it. That will take 2 units from the 5-unit jar.
There are now 3 units in the 5-unit jar.
Empty the 7-unit jar.
Pour the 3 units from the 5-unit jar into the empty 7-unit jar.
Fill the 5 unit jar.
Now you have 8 units, 3 in the 7-unit jar and 5 in the 5-unit jar.
Edwin