There were 200 more apples than pears at a fruit stall. After 1/4 of the apples and 2/7 of the pears were sold, there were 170 more apples than pears left.

(a) How many apples were there at the fruit stall at first?
(b) How many pears were left at the fruit stall in the end?

a = p+200

3/4 a = 5/7 p + 170
Now solve as usual