Mrs. Richmond bought some apples and pears in the ratio 3:5. After she gave away 3/5 of the apples and 40 pears, the ratio of apples to pears became 2:5. An apple costs 30 cents. A pear costs 15 cents more than an apple. How much did Mrs. Richmond pay for the fruit?