we take away the extra 8 boxes of apple juice first:
40 - 8 = 32
Now that we have equal number of apple juice and graph juice, we divide them into 2:
32 ÷ 2 = 16
There are 16 boxes of graph juice.
We add back the 8 boxes of apple juice we took away just now
16 + 8 =24
There are 24 boxes of apple juice.
Answer: 24 boxes of apple juice and 16 boxes of graph juice.