Nine years old? You can do it with equations, but I think it’s a lot easier as a bit of a logic puzzle (but then I always did have an odd approach to maths).
Tracey paid £3.10 for 7 jelly snakes and 4 sherbets. Madison paid £2.95 for 4 jelly snakes and 7 sherberts,
Tracy paid £3.10 for 11 sweets.
Madison paid £2.95 for 11 sweets, a saving of 15p.
An extra 15p gets you three more snakes instead of sherberts, therefore the difference between the two sweets is 5p.
So, if Tracey had all 11 sweets as snakes, it’d cost another 4 x 5p, £3.30.
£3.30 / 11 = 30p each.
Ditto if Madison had all sherberts, it’d £2.75 / 11 = 25p.
Who the hell calls their kid Madison? Some people.