Let the total amount be 200 {L.C.M of 40 and 50}
Chacobar C.P. = 200/50 = 4
Fivestar C.P = 200/40 = 5
Remaining Money after petrol = [200 - 200×10%] = 180
Remaining money after buying fivestars = [180 - 20×5] = 80
So number of Chacobar she can buy = 80/4 = 20