set the number of chickens as x and number of cows as y
so the farmer has total 28 animals
so x+y=28
you know that since the animals are healthy
chickens will have 2 legs and
cows will have 4 legs
the total number of legs are 64
so 2x+4y=64
since you want to find the number of cows
so from the first equation x+y=28
we will get another equation x=28-y
then plug into 2x+4y=64
2(28-y)+4y=64
56-2y+4y=64
56+2y=64
-56 -56
2y=8
y=4