A group of kids got together and started a dog-walking
business. They got lots of clients right away, so
that when they all walked their dogs together, there
were twelve heads and forty legs. How many kids
and how many dogs were out walking?
If all 12 heads belonged to kids, there would be
24 legs (2 legs for each head). But there are 40
legs. That leaves 16 legs, or 8 pairs of legs that
must belong to dogs. So there are 8 dogs. Subtract
8 from 12 (since everyone has only one head), and
that leaves 4 kids.