Mr Chew had 152 more mangoes than durians. He sold some mangoes and durians. The ratio of the number of mangoes sold to the number of durians sold is 3:1. The ratio of the number of durians sold to the number of durians left is 1:2. 2/3 of the fruit left were mangoes.

(a) How many durians did he have left?
(b) How many mangoes did he have at first?

m = d+152

If he sold x durians, then
x/(d-x) = 1/2
(m-3x) = 2/3 (m+d-4x)
from that we get
d=114
m=266
x=38
(a) 114-38 = 76
(b) m=266