i want to create rule for Polynomial,but it can't be executed!! how should i improve it ??
Did you post an image and not actual cut-and-pastable code?
Read about SameQ
http://reference.wolfram.com/language/ref/SameQ.html
and UnSameQ
http://reference.wolfram.com/language/ref/UnsameQ.html