Solution by benjaminchew13.
Let P(x,y):f(x+f(xy))=f(x)+xy for all reals x and y.
P(1,y):f(f(y)+1)=y+f(1), so we have that f is bijective.
P(0,0):f(0)=0.
P(x,−xf(x)):f(−f(x))=−x for all x=0, but obviously this is also true for x=0.
So f(−f(x))=−x for all x.
P(x,xf(x+y)−f(x)):f(f(x+y)−f(x))=y for all x=0.
So we have f(x+y)−f(x)=−f(−y) for all x=0.
So f(x+y)+f(−y)=f(x) for all x=0.
Therefore we have f(a)+f(b)=f(a+b) as long as b=−a.
y+f(1)=f(f(y)+1)=f(y)+1 for all f(y)=−1.
f(y)=−1⟺f(y)=f(−f(1))⟺y=−f(1).
So we have that f(y)=y+f(1)−1 for some constant c for all y=−f(1).
f(−f(1))=−1=−f(1)+f(1)−1, so we have that f(x)≡x+c for some constant c.
Substituting in, we have that c=0, so f(x)≡x is the only possible solution, which can be easily verified.