Solution by maromex.
Case 1: f(x)=0 for all real x
This function works.
Case 2: f(x0)=0 for some real x0
Let P(x,y) denote the given assertion f(f(x)+xf(y))=f(x)+yf(x).
Claim: f is surjective.
Proof: P(x0,f(x0)t−1):f(?)=t for any real t. □
P(−1,−1):f(0)=0.
P(x,0):f(f(x))=f(x).
For any real t, there exists a real s such that f(x0)+f(x0)f(s)=t because f is surjective.
P(f(x0),f(s)):f(f(x0)+f(x0)f(s))=f(x0)+f(s)f(x0). This means f(t)=t.
So f(x)=x for all real x. This function works. Combining cases, we get f(x)=0 for all real x and f(x)=x for all real x as the solutions.