Answer:
Candy=x=2.8 bags
Cookies=3+2.8=5.8 bags
Explanation:
Price
Bag of candy=$6.00
Bag of cookies=$4
Total sales=$40
Quantity
Let cookies=y=3+x
Let candy=x
There are 3 more bag of cookies than candy sold
Total sales=price*quantity of x + price*quantity of y
40=$4*(3+x) + 6*x
40=12+4x+6x
40=12+10x
40-12=10x
28=10x
X=28/10
x=2.8 bags