BrCH2CHBrCH2Bralc.KOH−−−−−→[X]CH3O−−−−−→Y;[X] and [Y] respectively are
BrHC=CHCH2Br,BrCH=CHCH2OCH3
BrCH2CHBrCH2Bralc.KOH−−−−−→(−HBr)CH2=CBrCH2BrVinyl derivative(less stable)orBrCH−CHCH2BrAllylderivative(more stable)
BrCH2CHBrCH2Br[X]−OCH3−−−−−−−→nucleophilicsubstitutionBrCH−CHCH2OCH3[Y]
The Br at allylic position is reactive, while Br at vinylic position is inert.