Red pens appear 50 times out of 80 times, indicating that the number of red pens accounts for 50/80=5/8.
The number of blue pens is 30/80=3/8.
So the number of red pens is 24*5/8= 15.
There are nine blue pens.