Please explain how they plugged the removable discontinuity in this question.

In the limit
[tex]\displaystyle \lim_{x\to c} f(x)[/tex]
we're interested in the value that [tex]f(x)[/tex] converges to as [tex]x[/tex] gets closer to [tex]c[/tex]. So in fact [tex]x\neq c[/tex].
In the given example, [tex]f(x)[/tex] is factorized to reveal a common factor of [tex]x-1[/tex] in the numerator and denominator. We have [tex]x\neq1[/tex] if [tex]x\to1[/tex], so [tex]x-1\neq0[/tex] so we can simplify
[tex]\dfrac{x-1}{x-1} = 1[/tex]
and *remove* the discontinuity.
Then
[tex]\displaystyle \lim_{x\to1} \frac{2(x-1)}{(x+1)(x-1)} = \lim_{x\to1} \frac2{x+1} = \frac2{1+1} = 1[/tex]