We have "9 sockets choose 3" for the 3 red lights. That's (9C3) ways.
After screwing in those 3 red bulbs, there remain only 6 open sockets.
We have "6 sockets choose 4" for the 4 yellow lights. That's (6C4) ways.
After screwing in those 4 red bulbs, there remain only 2 open sockets.
We have "2 sockets choose 2" for the blue lights. That's (2C2) = 1 way.
After screwing in those 2 bulbs, all the sockets have a bulb in them.
Answer (9C3)(6C4)(2C2) = 1260.