Solution by jasperE3.
f(xf(x)+f(x)f(y))=f(x2)+yf(x).
Note that f(x)=0 is a solution, any other solution must have some j such that f(j)=0. If f(a)=f(b):
f(j2)+af(j)=P(j,a)f(jf(j)+f(j)f(a))=f(jf(j)+f(j)f(b))=P(j,b)f(j2)+bf(j),
so a=b, that is, f is injective.
P(−f(0),0)⇒f(f(0)2)=f(0)⇒f(0)2=0⇒f(0)=0.
P(x,0)⇒f(xf(x))=f(x2)⇒xf(x)=x2, so f(x)=x for all x=0. Combined with f(0)=0 this implies f(x)=x for all x.