Devon and his friends bought strawberry wafers for $3 per packet and chocolate wafers for $1 per packet at a carnival. They spent a total of $30 to buy a total of 22 packets of wafers of the two varieties.
Part A: Write a system of equations that can be solved to find the number of packets of strawberry wafers and the number of packets of chocolate wafers that Devon and his friends bought at the carnival. Define the variables used in the equations.
Part B: How many packets of chocolate wafers and strawberry wafers did they buy? Explain how you got the answer and why you selected a particular method to get the answer.

Part A:

System of equations:

3x + 1y = 30
x + y = 22

Where ’x’ represents the number of strawberry wafer packets, and ’y’ represents the number of chocolate wafer packets.

Part B:

To find out, we must solve the system of equations.

x + y = 22

Subtract ’y’ to both sides:

x = -y + 22

Plug in -y + 22 for ’x’ in the first equation:

3x + 1y = 30

3(-y + 22) + 1y = 30

Distribute 3 into the parenthesis:

-3y + 66 + 1y = 30

Combine like terms:

-2y + 66 = 30

Subtract 66 to both sides:

-2y = -36

Divide -2 to both sides:

y = 18

Now plug this back into any of the two equations to find the ’x’ value.

x + y = 22

x + 18 = 22

Subtract 18 to both sides:

x = 4

The solution is (4, 18)

Therefore  they bought 4 strawberry wafer packets and 18 chocolate wafer packets.