These are substitution reactions. In each case we're replacing the -OH with either -CN or -I, so the nucleophiles will be NaCN or NaI (SN2 conditions).
Hydroxide (HO-) is a poor leaving group, so the first step in each of these reactions will be to convert the alcohol into a better leaving group. Two good leaving groups are Br- and SO3R-, but which one to use?
Every time an SN2 reation takes place the wedge on the alpha carbon becomes a dash (and vice-versa).
For a), the wedge remains a wedge, so we have to do two SN2 reactions (wedge to dash to wedge again). So we use PBr3 to turn the OH into a Br. (Bromination of an alcohol with PBr3 is an SN2 reaction and so inverts stereochemistry).
For b), the wedge becomes a dash, so we can only do one SN2 reaction. So instead of using PBr3 to make the OH a better leaving group, we use RSO2Cl, which doesn't break the carbon-oxygen bond and so doesn't invert the stereochemistry.