Given,
There are equal number of pens and pencils in a box.
Half of the pens are blue and half are red.
Number of blue pens = 12
Number of red pens = 12
Total number of pens = 12+12 = 24
Total number of pencils = Total number of pens = 24
So, total number of pens and pencils are in the box = 24 + 24
= 48