A company sells a container or trail mix that is 10% candy pieces and another container that is 25% candy pieces. How many cups of each mixture would be needed to make 18 cups that is 20 % candy pieces?

Let x be the number of cups of the 10% candy mixture.

The number of cups of the 25% candy mixture is 18 - x.
The total amount of candy in the 10% candy mixture is 0.1x cups.
The total amount of candy in the 25% candy mixture is 0.25(18 - x) cups.
The total amount of candy in the final mixture is 0.2(18) = 3.6 cups.
So, 0.1x + 0.25(18 - x) = 3.6
0.1x + 4.5 - 0.25x = 3.6
0.15x = 0.9
x = <<6=6>>6
The number of cups of the 10% candy mixture needed is 6.
The number of cups of the 25% candy mixture needed is 18 - 6 = <<18-6=12>>12. Answer: \boxed{6}.