Let B, Y, R be the numbers of blue, yellow and red lights, so there are B+Y+R lights altogether.
Y=(B+Y+R)/5, R=200, B=2Y.
Y=(2Y+Y+200)/5, 5Y=3Y+200, 2Y=200, number of yellow lights, Y=100, so number of blue lights, B=200, and the total number of lights is 500.