In a basket, there are 9 red balls each weighing 3 kg and 12 blue balls each weighing 6 kg. Some red and some blue balls are taken from this basket and placed in a second empty basket.
As a result of this operation; the average weight of the balls in the first basket is 5 kg, and the average weight of the balls in the second basket is 4 kg.
Accordingly, how many blue balls were placed in the second basket?
A) 2
B) 3
C) 4
D) 5
E) 6