1/5 of chicken John had is equal to 3/4 of Mark.
John sold 150 chickens while Mark bought 160.
The remider is in a ratio of 5:3, for John & Mark respectively.
What was the total number of chickens both had at first.
Let J be the amount John had at the start, and let M be the amount Mark had at the start.
So J/5 = 3M/4
Then if J' is the amount that John had after the buying and selling, and M' is the amount Mark had after buying and selling, then the 5:3 ratio tells us that
3J'/8 = 5M'/8
We also know that J' = J - 150
and M' = M + 160.
So if we replace J' and M' with those
we get:
So we have two simultaneous equations with two unknowns:
And solve...