Danielle and Jack are selling pies for a school fundraiser, Customers can buy blueberry pies and blackberry pies. Danielle sold 3 blueberry pies and 6 blackberry pies for a total of $138. Jack sold 7 blueberry pies and 12 blackberry pies for a total of $282. Find the cost each of one blueberry pie and one blackberry pie.