A store is having a sale on jelly beans and trail mix. For 9 pounds of jelly beans and 7 pounds of trail mix, the total cost is $51 . For 3 pounds of jelly beans and 5 pounds of trail mix, the total cost is $27. Find the cost for each pound of jelly beans and each pound of trail mix.