I'm sure there any many sequences of moves that will solve this problem. Listed below is one solution to the problem.

Let A represent the jug that holds 8 quarts. Let B represent the jug that holds 5 quarts. Let C represent the jug that holds 3 quarts.

Beginning situation - A contains 8 quarts, B contains 0 quarts, C contains 0 quarts.

Move #1 - Pour contents of A into B. A=3, B=5, C=0.

Move #2 - From jug B pour in enough moonshine to fill container C. A=3, B=2, C=3.

Move #3 - Pour contents of C into A. A=6, B=2, C=0.

Move #4 - Pour contents of B into C. A=6, B=0, C=2.

Move #5 - From jug A pour in enough moonshine to fill container B. A=1, B=5, C=2.

Move #6 - From jug B pour in enough moonshine to fill container C. A=1, B=4, C=3.

Move #7 - Pour contents of C into A. A=4, B=4, C=0.