To find the cost of each pound of almonds, we need to find the difference in the cost of the almonds between the two purchases and divide it by the difference in the number of pounds of almonds. In this case, the difference in the cost of the almonds is $31 - $12 = $19 and the difference in the number of pounds of almonds is 3 - 5 = -2 pounds. Dividing the difference in the cost by the difference in the number of pounds gives us $19/-2 = $-9.50 per pound. This means that the cost of each pound of almonds is $-9.50.
To find the cost of each pound of jelly beans, we can use a similar process. In this case, the difference in the cost of the jelly beans is $31 - $12 = $19 and the difference in the number of pounds of jelly beans is 8 - 2 = 6 pounds. Dividing the difference in the cost by the difference in the number of pounds gives us $19/6 = $3.17 per pound. This means that the cost of each pound of jelly beans is $3.17.