Let's look at a simpler example, and go in reverse (which I think makes things easier to understand).
Suppose we want to find $A$ and $B$ such that$$A(x-1)+B(x-2)=1.$$If we let $x=1$ then we see $B=-1$ and if we let $x=2$ then we see $A=1$. So we have shown$$1\cdot (x-1) - 1\cdot (x-2) = 1.$$Note that this is true for ALL $x$, and the $A$ and $B$ we found were unique.
Now let's divide both sides by $(x-1)(x-2)=x^2-3x+2$, giving that$$\frac{A}{x-2} + \frac{B}{x-1} =\frac{1}{x-2} + \frac{-1}{x-1} = \frac{1}{x^2-3x+2}.$$Of course this equation is undefined if $x=2$ or $x=-1$, but that doesn't change the values of $A$ and $B$.
The same type of argument is going on in #24 from the 2019 AMC 10A. Even if the different versions of the equation have different "domains", the values of the constants are unique regardless.
Note: I can explain more what I think they mean by "polynomial identity" if you like, but my opinion is that it doesn't need to be so complicated.