<s>[INST] Is there a contradiction is this exercise? The following exercise was a resolution to this problem

Let $\displaystyle\frac{2x+5}{(x-3)(x-7)}=\frac{A}{(x-7)}+\frac{B}{(x-3)}\space  \forall \space x \in \mathbb{R}$. Find the values for $A$ and $B$

The propose resolution was:
In order to isolate $A$ on the right side, multiply all the equation by $x-7$
$\displaystyle\frac{(2x+5)(x-7)}{(x-3)(x-7)}=\frac{A(x-7)}{(x-7)}+\frac{B(x-7)}{(x-3)}$
Now is my doubt. The resolution suggests that $x-7$ cancel out.
$\displaystyle\frac{(2x+5)}{(x-3)}=A+\frac{B(x-7)}{(x-3)}$
But, $x-7$ can be equal zero. In this situation, is allowed to perform this operation? One can say "for every $x\neq7$", but on the next step the resolution says "for $x=7$ we have".
$\displaystyle\frac{(14+5)}{(7-3)}=A+\frac{B(0)}{(7-3)} \Leftrightarrow A=\frac{19}{4}$
I think there is a contradiction is this resolution.
 [/INST] I would do it in another way. the equalation is $$\frac {2x+5}{(x-3)(x-7)}=\frac A {x-3}+\frac B {x-7}$$. what we can do is to take the common domniator on the right side getting $$\frac {2x+5}{(x-3)(x-7)}=\frac {A(x-7)+B(x-3)} {(x-7)(x-3)}$$. since the numerator in both sides is condcuted from numbers and x, we can conclude that: $$\begin{cases}
A+B=2 &  \\
-7A-3B=5 & \
\end{cases}
$$. solving this system is relatively simple and by substituting $A=2-B$  in the second equaltion you get $$B=4.75,A=-2.75$$
</s>