Solution by benjaminchew13.
Let P(x,y) denote f(f(x2)+f(x)f(y))=xf(x)+xy for all reals x and y.
P(1,y):f(f(1)f(y)+f(1))=y+f(1), so f is bijective.
P(0,0):f(f(0)2+f(0))=0.
P(0,f(0)2+f(0)):f(0)=0.
P(x,0):f(f(x2))=xf(x), so x→−x gives xf(x)=−xf(−x), and so f is odd when x=0, but since f(0)=0 we have that f is odd for all x.
P(1,0):f(1)=1.
P(−1,0):f(−1)=−1.
P(x,−1):f(f(x2)−f(x))=xf(x)−x.
P(x,−f(x)):f(x2)=−f(x)f(−f(x))=f(f(f(x)2)).
So we have f(f(x)2)=x2 for all x.
P(1,y):f(f(y)+1)=y+1.
P(−1,−y):f(1−f(−y))=y+1.
So we have f(y)+1=1−f(−y) for all y, and so f is odd.
.
P(x,1):f(f(x2)+f(x))=xf(x)+x.
P(x,y)+P(x,−y) gives f(f(x2)+f(x)f(y))+f(f(x2)−f(x)f(y))=2xf(x).
Taking x=0 and y such that f(x)f(y)=z, we have that
f(f(x2)+z)+f(f(x2)−z)=2f(f(x2)).
f(x2)=0⟺x2=0⟺x=0, but since we assumed that x=0, we also have that f(x2)=0.
Therefore letting w=f(x2) gives f(w+z)+f(w−z)=2f(w) for all w=0 and any z.
But since f is odd we have f(0+z)+f(0−z)=2f(0), so this also holds for w=0.
So we have that f(a+b)+f(a−b)=2f(a) for all a and b.
a=b gives 2f(a)=f(2a).
f(a+b)+f(a−b)=f((a+b)+(a−b)).
So we have that f is additive, and f(2x)=2f(x).
But P(1,y):f(f(y)+1)=y+1, so y+1=f(f(y))+f(1)=f(f(y))+1, and so f(f(x))=x for all x.
xf(x)=f(f(x2))=x2, so f(x)=x for all x=0. But since this also holds for x=0, we have that f(x)≡x, which can be easily verified to be a solution.