what's the blue player character for? can he switch on/off lamps?
1. try to use the pathfinder behaviour. there is a very good example built in in construct just look for the pathfinder example when you hit new project.
2. the distance between two sprites can be calculated with the distance() command. for example: distance(lamp1.X,lamp1.Y,yellowP.X,yellowP.Y) then you could save the distances to an array, sort the array by numbers and pick the smallest one. i havent workd much with arrays by now .. maybie there is an easier solution.
3. how do the enemeys move? with sine behaviour? (like up and down) or do they change directions and chase the yellow guys? you could use something like every tick , if enemey is on collision with green lamp -> set position to self.X , self.Y then he will just keep staying there as soon as he gets in touch with a lamp so he'll not be able to move inside the lamp.
4. player, on collision with enemy -> destroy
i hope this could help a bit.. otherwise u may need to be more specific or someone with more C2 skills has to join in here ..