Concepts and reason
In general, primary alkyl halides undergo reactions with strong nucleophiles and tertiary alkyl halides undergo
reaction with weak nucleophiles.
Fundamentals
Strong nucleophile is required for reaction and these reactions are occurred in polar aprotic solvents (i.e. DMSO, DMF etc.).
Weak nucleophile is required for reaction. If a nucleophile is strong then there is a chance for the E2 product formation.
Answer:
Part a
The reaction is,

Explanation:
Here, sodium methoxide acts as a strong nucleophile and DMSO is polar aprotic solvent. 1-bromo-3-methylbutane reacts with to form 1-methoxy-3-methylbutane.
Part b
The reaction is,

Explanation:
Methanol is weak nucleophile and it reacts with 2-bromo-2-methylbutane to form 2-methoxy-2-methylbutane.