Solution by jasperE3.
f(f(x2)+f(xy))=xf(x)+xy.
P(1,x)⇒f(f(1)+f(x))=f(1)+x, so f is bijective.
P(−x,−y)⇒f(f(x2)+f(xy))=−xf(−x)+xy, comparing with P(x,y) we have xf(x)=−xf(−x) so f(−x)=−f(x) for all x=0. But there is some k such that f(k)=0, and if k=0 then f(−k)=−f(k)=0=f(k) so −k=k, which contradicts k=0, and so f(−x)=−f(x) for x=0 as well!
P(x,−x)⇒xf(x)−x2=0⇒f(x)=x for all x=0, then f(x)=x since f(0)=0 as well.