P(x)=(x-a1) (x-a3) (x-a5) + 3(x-a2) (x-a4) (x-a6)
P(a1)<0
P(a2)>0
implies there's a root in (a1,a2)
again,
P(a3)>0
P(a4)<0
P(a5)<0
P(a6)>0
Therefore, there are 3 real roots in the intervals (a1,a2) , (a3,a4), (a5,a6).
Hence, only correct option (a). [1]