If you take your two empty jars and first fill up the 7 quart one. Pour that into the 3 quart one, which gives you 4 quarts left.
Then empty the 3 quart one, and fill it again with the water from the 7 quart one, this time it'll leave 1 quart behind.
Now put that 1 quart of water into the 3 quart jar.
Fill up the 7 quart jar again and pour it into the 3 quart jar, but this time you can only fit 2 quarts of water in it because it already had 1 quart in it.
What you'll have left is 5 quarts of water in the 7 quart jar.