Here you have two unknowns, so you would need two equations (system of equations). By using w to represent walnuts and c to represent chocolate chips your equations would be 5w + 2c = 10 and 3w + 8c = 23, the coefficients being the amount of pounds of walnuts and chocolate chips and the right hand side of the equations being the total price. From there you can either solve for one variable in terms of the other and plug in to the other equation, or you could subtract one equation from the other ( I personally prefer solving for one variable in terms of the other and then plugging in to the other equation).