Answer:
4 pigs and 8 chickens.
Explanation:
Let number of chickens be c and number of pigs be p:
Animals:
c + p = 12
Legs:
2c + 4p = 32
Multiply the first equation by 2:
2c + 2p = 24
Subtract this from the second equation:
2c - 2c + 4p - 2p = 32 - 24
2p = 8
p = 4
and therefore c = 12 - 4 = 8.