Solution by jasperE3.
f(f(x)2+f(x)f(y))=x2+yf(x).
Note that f≡0 isn’t a solution, so there is some j such that f(j)=0.
P(j,x)⇒f(f(j)2+f(j)f(x))=j2+xf(j).
From this alone, f is bijective: if f(a)=f(b) then:
j2+af(j)=f(f(j)2+f(j)f(a))=f(f(j)2+f(j)f(b))=j2+bf(j)
so a=b, and j2+xf(j) can take any real value for x∈R.
P(f−1(x),f−1(y))⇒f(x2+xy)=f−1(x)2+xf−1(y), so f−1 satisfies:
f−1(f−1(x)2+xf−1(y))=x2+xy
which is equation #504 with unique solution f−1(x)=x, and therefore f(x)=x.