40*0.5/ 1000=0.02
Then you can set the time to x.
(0.05-0.02)*X=30
X = 1000 hours
So the life of 1000 hours is the critical point. At this time, the electricity they need is
100* 1000/ 1000*0.5+2=52
40* 1000/ 1000*0.5+32=52
If it exceeds, the energy-saving lamp is cost-effective.