yunny had thrice as many stamps as Zul at first.Then each of them bought an equal number of stamps.In the end , Zul had 36 stamps and Yunny had twice as many stamps as Zul . find the number of stamps Yunny had at first ?

y = 3 z

z + x = 36
y + x = 72
------------
z - y = -36 so z = y-36

y = 3 (y-36)
2y = 3*36
y = 3*18 = 54