Nucleophilic Substitution

Question: 

Predict the major products for the reaction and show the full mechanism
nucleophilic substitution