How do I answer this question? Can you please explain and show an example. Please explain well because I don't know what to write.
Your question is a bit vague.
In most algebras, terms in the algebra can be directly compared for equality by rewriting to some canonical form (meaning that terms in the same equivalence class always rewrites to the same canonical form).
For example, we can define canonical form for a polynomial to be $\displaystyle a_0 + a_1x^1 + a_2x^2 + ...$.
We can rewrite $\displaystyle (x + 1)^2 = 1 + 2x + x^2$ and $\displaystyle x^2 - (x - 1) + 3x = 1 + 2x + x^2$ to show that $\displaystyle (x + 1)^2 = x^2 - (x - 1) + 3x$ since they have the same canonical form.
Furthermore, if the canonical form of two polynomials differ, then we can conclusively say they are different.