SN2 nucleophilic attack with alpha unsaturation
As Ben Norris said, the aspects of nucleophilic and electrophilic attacks are not relevant in the second case.  

Talking about the compound given in question 1(b), the first step of nucleophilic attack is opposed by the conditions you mentioned, i.e., of the electron withdrawal effect of the double bond and replusion of nucleophile by $\pi$ electron cloud.  

But talking in terms of yield of the product, it is necessary to consider two things:  


Chlorine is a good leaving group.  
The stability of the carbocation intermediate formed by $SN_1$ mechanism (steric factors don't favour $SN_2$). The carbocation formed will be very stable due to conjugation with the double bond. Hence, the yield of the product is not much low.  


While solving the above question, we should look at the stability of carbocation intermediate formed,which is a more dominating effect. Though Bromine is a better leaving group, and there is decrease in tendency for nucleophilic attack due to $\alpha $-unsaturation; both factors which support higher nucleophilic attack for the first compound, stabilisation of carbocation by resonance (conjugation) is highly stabilising, and this shadows the opposing factors.