Answer: The boy sold 26 bags of butter popcorn and 14 bags of caramel popcorn.
Step-by-step explanation: Given that the boy scouts are selling two types of popcorn as part of a fundraiser, butter and caramel.
Butter popcorn sells for $5 per bag and caramel popcorn sells for $6.50 per bag. Till now, Alec has sold 40 total bags and raised $221.
We are to find the number of bags he has sold for each type of popcorn.
Let a and b represents the number of bags of butter popcorn and caramel popcorn that the boy sold.
Then, according to the given information, we have
![a+b=40~~~~~~~~~~~~~~~~~~~~~~~~~~~(i)\\\\5a+6.5b=221~~~~~~~~~~~~~~~~~~~~(ii)](https://img.qammunity.org/2020/formulas/mathematics/college/3x38wjwme1v0t13bw12z3sh13odlm4asg3.png)
Multiplying equation (i) by 5, we have
![5a+5b=200~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(iii)](https://img.qammunity.org/2020/formulas/mathematics/college/d088ltfytq0gzii2kqib4muhvrcuyd5fon.png)
Subtracting equation (iii) from equation (ii), we get
![(5a+6.5b)-(5a+5b)=221-200\\\\\Rightarrow 1.5b=21\\\\\Rightarrow b=(21)/(1.5)\\\\\Rightarrow b=14.](https://img.qammunity.org/2020/formulas/mathematics/college/8n6pnhlimknlyfwbvrwcdu351dx5dudl83.png)
From equation (i), we get
![a+b=40\\\\\Rightarrow a+14=40\\\\\Rightarrow a=40-14\\\\\Rightarrow a=26.](https://img.qammunity.org/2020/formulas/mathematics/college/80ry5f2gk3lyt5oyd42s1dtc77yj71glnt.png)
Thus, the boy sold 26 bags of butter popcorn and 14 bags of caramel popcorn.