20 animals x 2 legs each = 40 legs minimum (all chickens have two legs, all pigs get their first two legs)
54-40 = 14 legs left over
Each pig needs another pair of legs
14/2=7
Therefore, there are 7 pigs, and (20-7=13) 13 chickens.
Now check, 7 x 4 = 28 and 13 x 2 = 26
28 + 26 = 54
OR, draw a picture. Draw 20 animals. Give each animal two legs first. Then add two more legs at a time, counting as you go, until you have 54 legs.
Or, act it out. Get 20 people to stand on two legs, then assign some of those people to get on all fours, until you have 54 "legs".