From part (a), each pie cost $6. Each cupcake cost $4.50.
Mrs Brown bought 2/5 as many cupcakes as pies. So for every group: 5 pies and 2 cupcakes
Cost of 5 pies = 5 × $6 = $30
Cost of 2 cupcakes = 2 × $4.50 = $9
Difference per group = $30 - $9 = $21
Total difference = $504 Number of groups = 504 ÷ 21 = 24
Number of pies = 24 × 5 = 120
120