Let x and y be the amounts (in pounds) of the gummy worms worth $5 and $3, respectively. The sum of the weights of the gummy worms as stated is 30. Thus,
x + y = 30
The next equation is derived from the summation of all the products of the price and amount before and after mixing. That is,
5x + 3y = 30(3.8)
The values of x and y obtained using the two equations are 12 and 18, respectively.
Hence, 12 and 18 pounds of gummy worms worth $5 and $3, respectively will be used for the mixture.