This is for integration of rational functions but there's a part I don't understand that is pure algebra.

2x + 4 = Ax(x-2) + B(x - 2) + Cx^2

In the book they use x = 0 and x = 2 to get B = -2 and C = 2, respectively. This makes perfect sense to me but they get A = -2 by

equating the coefficients of x^2 on the two sides

I really don't know what they mean by this. I know what a coefficient is but I still do not follow. Can anyone explain or show how they would do this. My book assumes a ton of knowledge from classes I took like 10 years ago