Question 1004535
Let's call the Blue pens B and the Red pens R.


{{{B = R + 648}}} (From the question)... Equation(i)

Upon selling 1/6 of blue pens, we now have a new amount of Blue pens. We shall call this new amount of blue pen Bn)

{{{Bn = B-B/6}}}, (Where B is the original amount of Blues)

{{{Rn=  R - 3R/4}}} (Same thing applies to Reds after selling 3/4)

{{{Bn = Rn + 1338}}} (Because blues had 1338 more than red after sales)

{{{B - B/6 = R- 3R/4 + 1338}}} (Substituting the values of Bn and Rn into above equation)

{{{5B/6 = R/4 + 1338}}}

{{{(5R + 3240)/6 = (R+5352)/4}}}

{{{6R + 32112 = 20R + 12960}}}
{{{-14R = 12960 - 32112}}}

{{{14R = 19152}}}

R= 1368 (Total amount of RED before sales)

B = 2016 (Total amount of Blues before sales)

How many pens? Simply add up B and R. I will allow you do that..
Enjoy!