Identify (a) and (b)
(a) = Methanesulfonyl chloride (b)=NaCNDMF
With the reagent (a), there is no change in the stereochemical arrangement at the carbon of interest. In the next step, there is a Walden Inversion at the carbon where the leaving group is substituted with −CN. This step definitely has to be SN2 and thus it would make sense to have a suitable solvent - preferably a polar aprotic one.
The first step basically converts the poor leaving group −OH into a really good one so the next step - as in the SN2 substitution can happen smoothly.