First we know that every chicken and horse has 1 head so we can use the equation
h+c=28
every chicken has 2 legs and every horse has 4 legs so we can use the equation
2c + 4h = 80
Now we solve the first equation for c
c=28-h
Substitute c into the second equaiton:
2(28-h) + 4h = 80
distrubute the 2
56-2h+4h=80
solve for h
56+2h=80
2h=24
h=12
substitute h back into the first equation
12+h=28
h=16
16 horses 12 chickens