I don't want the answer I want to know how you solve the problem!

A restaurant manager bought 20 packages
of bagels. Some packages contained 6 bagels
each, and the rest contained 12 bagels each.
There were 168 bagels in all. How many
packages of 12 bagels did the manager buy?
A 6
B 8
C 9
D 12

Say X packages have 12 bagels. Then 20 -X have 6 bagels.
6(20-X) + 12X = 168
6X = 168-120
Solve that for X.

To solve this problem, we can use a system of equations. Let's assume that X represents the number of packages containing 12 bagels.

Since there were a total of 20 packages, the number of packages containing 6 bagels would be 20 - X.

Now, let's use the information given in the problem to set up an equation. The number of bagels from the packages containing 6 bagels is 6 multiplied by the number of packages (20 - X). Similarly, the number of bagels from the packages containing 12 bagels is 12 multiplied by the number of packages (X). This should be equal to the total number of bagels, which is 168.

Thus, the equation becomes:

6(20 - X) + 12X = 168

Now, we can solve this equation to find the value of X.

By simplifying the equation, we get:

120 - 6X + 12X = 168

Combining the X terms, we have:

6X = 168 - 120

Simplifying further, we have:

6X = 48

To isolate X, we divide both sides of the equation by 6:

X = 48 / 6

Solving this equation, we find X = 8.

Therefore, the manager bought 8 packages of 12 bagels.

So, the answer to the question is B) 8.