R=number of red pens, B=number of blue pens.
R/B=3/4, 4R=3B
(R+20)/B=2/1=2, R+20=2B
Substitute for B=4R/3 so R+20=2(4R)/3=8R/3
So 3R+60=8R (multiplying through by 3), and 5R=60 so R=12.
CHECK
B=4*12/3=16.
R/B=12/16=3/4 OK
R+20=32 and 32/16=2/1 or 2:1.
So there are 12 red pens.