A school clerk bought a box of pens. 1/12 of the pens were black, 1/6 of them were green and 2/3 of the remainder were red. If there were 96 more red pens than green pens, how many pens did the clerk buy altogether?

number of pens --- x

black ---- x/12
green --- x/6
so far we have 1/12 + 1/6 or 1/4 identified, so
(2/3)(3/4 x) are red

red = green + 96
(2/3)(3x/4) = x/6 + 96
1/2 x = x/6 + 96
times 6
3x = x + 576
x = 288

so he bought 288 pens

check:
black = 24
green = 48
red = 2/3 (288-24-48) = 144

red - green = 144-48 = 96

my answer is correct