Performing fractional decomposition on the fraction
$\frac{a(x-c)+b}{(x-y_1)(x-y_2)}=\frac{A}{x-y_1} + \frac{B}{x-y_2}$ $\space$(1)
where $x$ is a variable and the rest are constants, you find
$A = \frac{a(y_1-c)+b}{y_1-y_2}$
$B = \frac{a(y_2-c)+b}{y_2-y_1}$
If you try to check these values by inserting $A$ and $B$ into equation (1), you arrive at this equation
$\frac{a(x-c)+b}{(x-y_1)(x-y_2)}= \frac{(y_1-y_2)^2[a(x-c)+b]}{(x-y_1)(x-y_2)}$
which implies that $(y_1-y_2)^2 = 1$, despite these being just arbitrary constants. Is this true? Where does this come from? I came upon this from checking the values obtained from fractional decomposition for a dynamic model on a first order system.
Your $A$ and $B$ are correct. Then you had a mistake somewhere. Inserting $A$ and $B$ on the RHS gives the following steps:
$$ \frac{(a(y_1-c)+b)}{(y_1-y_2) (x-y_1)} - \frac{(a(y_2-c)+b)}{(y_1-y_2) (x-y_2)} \\ = \frac{(a(y_1-c)+b) (x-y_2)}{(y_1-y_2) (x-y_1)(x-y_2)} - \frac{(a(y_2-c)+b)(x-y_1)}{(y_1-y_2) (x-y_1)(x-y_2)} \\ = \frac{a(x-c)(y_1-y_2) +b(y_1-y_2) }{(y_1-y_2) (x-y_1)(x-y_2)} \\ = \frac{a(x-c) +b }{ (x-y_1)(x-y_2)} $$