You need to work out how many animals there are in total first. Mary sells 8 of her sheep so 12-8 = 4 sheep In total she'll have 4+ 16 + 24 + 6 = 50 animals 4/50 = 0.08 0.08 x 100 = 8% - to get a percentage
or 4/50 -> need to make denominator /100 so whatever you do to top, do to bottom -> 8/100 so 8%