A chicken has 1 pair of legs, and a pig has 2. If we have 10 animals, our equations are:
x + y = 10
x + 2y = 17
x is the number of chickens and y is the number of pigs
Subtract the two equations:
y = 7
This means that there are 7 pigs. 10 animals-7 pigs=3 animals remaining. There are three chickens remaining. To double check our answer, we can figure that 7*2=14+3 (the 3 pairs of chicken legs)= 17.