Amos bought some chickens and gave half of them to Nathan. Nathan bought some ducks and gave half of them to Amos. Amos sold 6 ducks and Nathan sold 9 chickens. In the end the number of ducks Amos had was 1/7 of the number of his remaining chickens and the number of ducks Nathan had was 1/4 of the number of his remaining chickens.

(a) How many chickens did Amos buy?
(b) How many chickens and ducks did they have altogether in the end?

(a) Suppose Amos bought x chickens, and Nathan bought y ducks

Amos’s remaining chickens = 1/2x:
Amos’s remaining ducks = 1/2y - 6:
Nathan’s remaining chickens = 1/2x - 9:
Nathan’s remaining ducks = 1/2y
1/2y - 6 = 1/7 * 1/2x - (1)
1/2y = 1/4 * (1/2x - 9) - (2)
(1) * 2, (2) * 2:
y - 12 = 1/7x - (3)
y = 1/4x - 9/2 - (4)
(4) - (3): 12 = (1/4 - 1/7)x - 9/2 => x = 154 - (5)
y = 1/4 * 154 - 9/2 = 34
So Amos bought 154 chickens.
(b) (1/2 * 154) + (1/2 * 154 - 9) = 154 - 9 = 145
(1/2 * 34 - 6) + (1/2 * 34) = 34 - 6 = 28
So they had 145 chickens and 28 ducks altogether in the end.