The usual trick with radicals is to multiply and divide by the conjugate expression: $$\begin{align}f(x)&=\frac{(\sqrt{1+x}-\sqrt{1-x})(\sqrt{1+x}+\sqrt{1-x})}{\sqrt{1+x}+\sqrt{1-x}}\\\& =\frac{(1+x)-(1-x)}{\sqrt{1+x}+\sqrt{1-x}}\\\&=\frac{2x}{\sqrt{1+x}+\sqrt{1-x}}\end{align}$$ which avoids cancellation (and even shows that for $x\approx 0$, we have $f(x)\approx x$).