Megan made some cookies for sales. She made 36 chocolate cookies than almond cookies. There were 24 fewer butter cookies than almond cookies. After selling 1/4 of chocolate cookies, 2/3 of the almond cookies and 5/6 of the butter cookies, Megan had 323 cookies left. How many chocolate cookies did Megan make?

Almonds ---- x

chocs----- x+36
butts ----- x-24

cookies left over: (3/4)(x+38) + (1/3)(x) + (1/6)(x-24)

(3/4)(x+38) + (1/3)(x) + (1/6)(x-24) = 323
The LCD is 12, so multiply each term

take it from here