Perry and Jack are selling pies for a school fundraiser. Customers can buy apple pies and black berry pies. Perry sold 9 pies and 12 blackberry pies for a total of $165. Jack sold 8 apple pies and 3 blackberry pies for a total of $70. Find the cost each of one apple pie and one black berry pie.