It is easy to prove that if no denominator on the RHS has a factor of $\,(x\!-\!2)^2\,$ then neither does the LHS, i.e. a factor of $\,x\!-\!1$ can be cancelled out of the LHS, since
$\quad\dfrac{f(x)}{(x\!-\!2)^2 g(x)}\, =\, \dfrac{a(x)}{(x\!-\!2)b(x)} + \dfrac{c_1(x)}{d_1(x)}+\cdots+\dfrac{c_n(x)}{d_n(x)}\ \ \bigg\lbrace\ \begin{eqnarray} x\!-\!2\nmid b(x),\,d_i(x),\ \ {\rm i.e.}\\ b(2)\ne 0,\ \ d_i(2)\ne 0\quad\ \ \end{eqnarray}$
$\quad \Rightarrow\ f(x)\, =\, (x\!-\!2) g(x) \left(\dfrac{a(x)}{b(x)} + \dfrac{(x\!-\!2)c_1(x)}{d_1(x)}+\cdots + \dfrac{(x\!-\!2)c_n(x)}{d_n(x)}\right)$
$\quad \stackrel{\large x=2}\Rightarrow\ f(2) = 0\ \Rightarrow\ f(x) = (x\!-\!2) h(x)\ \Rightarrow\ \dfrac{f(x)}{(x\!-\!2)^2 g(x)}\, =\, \dfrac{h(x)}{(x\!-\!2)g(x)}$