A store is having a sale on jelly beans and trail mix. For 2 pounds of jelly beans and 12 pounds of trail mix, the total cost is $23. For 5 pounds of jelly beans and 3 pounds of trail mix, the total cost is $17. Find the cost for each pound of jelly beans and each pound of trail mix.