calculate the volume of 0.1M NaOH which must be added to 50 mL of 0.1M HCl to give a final solution of pH 6???

For pH = 6 we want the final H^+ to be 1 x 10^-6 M.

Since this is so close to the equivalence point, the final volume will be essentially 100 mL or 0.1 L. Therefore, we want 1 x 10^-7 moles in the 100 mL.
We had 0.005 moles if we took 50 mL of 0.1 M HCl.
We have left 1 x 10^-7 moles
0.005 - 1 x 10^-7 = 0.0049999 moles.
M = moles/L.
L = moles/M = 0.0049999/0.1 = 0.049999 L or 49.999 mL of the NaOH to be added.