this is only true if ax² + bx + c = dx² + ex + f for all x (or in fact just for some values, see why below)
Replacing x by 0 you find that c=f. So ax²+bx=dx²+e.
Now replacing x by 1 we have a+b=d+e. X by -1 we have a-b=d-e. Adding those 2 equations we have 2a=2d so a=d. Substract them so b=e.