A wholesale food supplier charges x dollars for each bag of flour and y dollars for each bag of sugar. Bakery A purchases seven bags of flour and five bags of sugar for a total cost of $260.45. Bakery B purchases five bags of flour and three bags of sugar for a total cost of $171.35. What is the cost of each bag of flour? Each bag of sugar?