Harris sold 8 cats, 5 hamsters and some birds. He sold 7 more birds than hamsters. What fraction of the total number of animals sold were hamsters?

looks like he sold 5+7=12 birds.

so hamsters were 5/(8+5+12) = 1/5 of all the animals