A confectionary bakes 20 banana cakes, 50 chocolate cakes and 30 durian cakes every day. The total price of 1 banana cake, 1 chocolate cake and 1 durian cake is $29.50. On a particular day, at 7 pm, the confectionary has collected $730 from the sales of the cakes, and there were half the banana cakes, one-tenth of the chocolate cakes and one third of the durian cakes left. In order to sell as many cakes as possible, all cakes were discounted by 40% from their respective selling price from 7 pm onwards. By closing time, all the cakes were sold and the total revenue for the entire day was $880. Determine the selling price of each type of cake before discount.

so they sold 10 bananas, 45 chocolates, 20 durians.

b+c+d = 29.50
10b+40c+20d = 730
730 + 0.60(10b+5c+10d) = 880
now just solve as usual

b = 8.5

c = 9
d = 12