Which is a better nucleophile: hydroxide anion or amide anion?
I was not able to find data on this nucleophilicity of $\ce {NH2^-}$ and $\ce {OH^-}$ in dimethylformamide, $\ce {Me2NCHO}$. However, I have a plausible explanation as to why the answer may not be what you expected. 

Firstly, it is important to remind ourselves that nucleophilicity is always relative to the electrophile that we are concerned with. However, it is also possible to discuss nucleophilicity generally, i.e. not with respect to any particular electrophile. This is the case now. 

The fact that the solvent is polar and aprotic suggest that hydrogen bonds cannot be made with the $\ce {N}$ and the $\ce {O}$ of the nucleophiles. However, it does not restrict us to form hydrogen bonds between the lone pair on the carbonyl oxygen with the partially positively-charged $\ce {H}$ atoms on the ions. This is not at all unlikely considering that the strong delocalisation of the lone pair on the $\ce {N}$ in amides, gives a significant resonance structure with this carbonyl oxygen bearing a formal negative charge. 

$\ce {NH2^-}$ has two such $\ce {H}$s and $\ce {OH^-}$ has only one such hydrogen. Thus, perhaps, we may still expect greater extent of solvation for the former. Relative to $\ce {OH^-}$, the greater amount of solvation of $\ce {NH2^-}$ increases the activation energy required to initiate the subsitution reaction since solvation can be said to bring down the energy of the reactant in the reaction energy profile. Thus, the rate of substitution with $\ce {OH^-}$ would be faster than $\ce {NH2^-}$ in this polar aprotic solvent. 

Alternatively, the answer provided could very well be wrong. That is a possibility that cannot be discounted...