Question 51687
Use the standard formula of a line to solve:
Ax+By=C
A=rate of item A
x=amount of item A
B=rate of item 
y=amount of item B
C=(rate of C)(Amount of item C)
C = ($8 X 1 box = $8)
C also equals 50 individual pieces of candy
So, x+y=50 or 50-x=y
.
Ax+By=C
Setting it up:
(Rate A)(amount A) + (Rate B)(amount B)=C
.10x+.20y=8 [The equation of the line]
(.10)(x)+(.20)(50-x)=8 [Substitute (50-x)=y]
.10x+10-.20x=8 [Solve for x]
-.10x=-2
x=20
.

Check by plugging all of the values back into the original equation:
Ax+By=C
(.10)(20)+(.20)((50-20)=8
(.10)(20)+(.20)(50-20)=8
2+10-4=8
8=8 [Checks out]