Let's see. We can clarify a few things to make the question easier.
-We bought 10 packs of candy -M&Ms are $1 per pack -Twizzlers are $0.5 per pack
We need to find out how many bags of M&Ms we bought by only spending $6.
There are many combinations you can use to get to $6. However, I'm not sure what the format is. For example, you could buy 4 twizzler packs and then use the remaining money to find out how many M&Ms you bought. But this seems to be open to answers. Sorry