Solution by jasperE3.
f(xf(y)+f(x)f(y))=xf(y)+yf(x).
f(x)=0 is a solution, else there is some j with f(j)=0 and P(j,x) implies f is injective:
If f(a)=f(b):
P(j,a)⇒f(jf(a)+f(j)f(a))=jf(a)+af(j).
P(j,b)⇒f(jf(a)+f(j)f(a))=jf(a)+bf(j).
and so a=b.
Swapping x,y in the original equation we have:
f(xf(y)+f(x)f(y))=xf(y)+yf(x)=f(yf(x)+f(x)f(y)),
so xf(y)+f(x)f(y)=yf(x)+f(x)f(y) which becomes upon setting y=1 the identity f(x)=xf(1). Testing, our solutions are (noting the existence of j) f(x)=−2x and f(x)=x.