Final answer:
There are 6 goats and 30 sheep on the farm.
Step-by-step explanation:
To solve this problem, we'll set up two equations based on the given information, using the variables 'x' for the number of goats and '5x' for the number of sheep. The first equation represents the total number of goats and sheep: x + 5x = 40. Simplifying this equation, we get 6x = 40. Solving for 'x', we find that there are 6 goats.
To find the number of sheep, we can substitute the value of 'x' into the second equation, which represents the relationship between the number of sheep and goats: 5x = 5 * 6 = 30 sheep. Therefore, there are 6 goats and 30 sheep on the farm.