To make a snack mix, Anthony buys almonds for $5 per bag and peanuts
for $2 per bag. He buys 8 bags of nuts for $31. How many bags of each
type of nut did he buy?​