Darzens reaction on allylic position
This reaction is a special case of Darzen's halogenation. I think you are aware of mechanism of Darzen's reaction or else you can check it here. It occurs through a 6 membererd cyclic intermediate. I'll show you the first reaction you would be able to answer second one in succession.