we are given
there are hens and rabbits
Let's assume
number of hens =x
number of rabbits =y
Since, number of heads for hen is 1
and number of head for rabbit is 1
and we are given
total number of heads =43
so, we get equation as

now, we can solve for y

There are two legs of hens
and there are four legs of rabbit
and total number of legs =124
so, we will get equation as

now, we can plug back y

now, we can solve for x




now, we can find y


So,
Number of hens =24
Number of rabbits =19.........Answer