Let's assume that the number of red pens in the beginning was 3x, and the number of blue pens was 4x.
After Mr. Lim put 20 red pens into the box, the number of red pens became 3x + 20. The number of blue pens remained the same, 4x.
According to the problem, the ratio after adding the red pens became 2:1. This means that (3x + 20)/(4x) = 2/1.
To solve for x, we can cross multiply: 2(4x) = (3x + 20)(1)
8x = 3x + 20
Subtract 3x from both sides: 5x = 20
Divide by 5: x = 4
So, the initial number of red pens was 3x = 3(4) = 12.
(A) The number of red pens in the end was 3x + 20 = 3(4) + 20 = 12 + 20 = 32.
(B) The number of blue pens remained the same, 4x = 4(4) = 16.