\(Q=x^3-y^3-3xy\)
\(\Rightarrow Q=\left(x-y\right)\left(x^2+xy+y^2\right)-3xy\)
\(\Rightarrow Q=x^2+xy+y^2-3xy\)
\(\Rightarrow Q=x^2-2xy+y^2=\left(x-y\right)^2\)
\(\Rightarrow Q=1^2=1\)
\(Q=\left(x-y\right)\left(x^2+xy+y^2\right)-3xy=x^2+xy+y^2-3xy\)
\(x^2+y^2-2xy=\left(x-y\right)^2=1^2=1\)