Final answer:
The farmer has 23 chickens and 7 cows.
Step-by-step explanation:
Let's assume that the farmer has x chickens and y cows. Chickens have 2 legs and cows have 4 legs. So, we can set up two equations based on the number of animals and their legs. The first equation is x + y = 30 (total number of animals) and the second equation is 2x + 4y = 74 (total number of legs). We can solve these equations simultaneously to find the values of x and y.
First, let's solve the first equation for x. Subtracting y from both sides, we get x = 30 - y.
Substituting this value of x into the second equation, we have 2(30 - y) + 4y = 74. Simplifying the equation, we get 60 - 2y + 4y = 74. Combining like terms, we get 60 + 2y = 74. Subtracting 60 from both sides, we get 2y = 74 - 60. Simplifying further, we have 2y = 14. Dividing both sides by 2, we get y = 7.
To find the value of x, we can substitute this value of y into the first equation. So, x + 7 = 30. Subtracting 7 from both sides, we get x = 30 - 7. Simplifying, we have x = 23.
Therefore, the farmer has 23 chickens and 7 cows.