Let denote by P(x,y) the equation
f(xf(y)−y)+f(xy−x)+f(x+y)=2xy.
P(0,y) gives us f(−y)+f(y)=0,∀y. Thus f is an odd function.
P(−1,y) follows
f(−f(y)−y)+f(−y+1)+f(−1+y)=−2y.
From this, since f is odd, we have f(−f(y)−y)=−2y and thus f(f(y)+y)=2y. So f is surjective.
Since f is surjective, there is real number a such that f(a)=−1.
P(x,a) gives us
f(−x−a)+f(ax−x)+f(x+a)=2ax.
From this, again since f is odd we have f(ax−x)=2ax for all x∈R.\ (*)$
If a=1 then from above equation, we have f(0)=2x,∀x∈R, which is a contradiction. Thus, a=1.
Replace x=a−1t in (∗), we have
f(t)=a−12at=ct with c=a−12a.
Replace back into the original equation, we have
c(cxy−y)+c(xy−x)+c(x+y)=2xy.
From which (c2+c−2)xy=0,∀x,y∈R which implies that c∈{1,−2}.
So f(x)=x or f(x)=−2x for all x∈R.
It is easy to check that these two functions satisfy the condition.