Answer: old McDonald has 54 chickens and 2 cows.
Explanation:
Let x represent the number of chickens that old McDonald have.
Let y represent the number of cows that old McDonald have.
He counted 56 heads. A chicken and a cow has one head each. It means that
x + y = 56
He counted 116 legs. A chicken has 2 legs and a cow has 4 legs. It means that
2x + 4y = 116 - - - - - - - - -1
Substituting x = 56 - y into equation 1, it becomes
2(56 - y) + 4y = 116
112 - 2y + 4y = 116
- 2y + 4y = 116 - 112
2y = 4
y = 4/2 = 2
x = 56 - y = 56 - 2
x = 54