Answer:
Explanation:
Let X and Y have a and b goats respectively
Therefore=> a>b
Given=>
1) If Y gives 1 goat to X then
2*(b-1)=(a+1) .... (i)
2) If X gives 1 goat to Y then
(b+1)=(a-1) .... (ii)
Solving from (i) and (ii), we get => a=7, b=5
Therefore=> X has 7 goats and Y has 5 goats.