Solution by megarnie.
The answer is just f(x)=x and f≡0. These work. Let P(x,y) be the given assertion. Assume f is not identically zero. If we choose x with f(x)=0, then the RHS is 2yf(x), which can take all real numbers, so f is surjective.
P(1,y):f(2f(y))=2yf(1). If f(1)=0, then f(2f(y))=0∀y, so f is identically zero because it’s surjective. Therefore, f(1)=0. Now, if f(a)=f(b), then f(2f(a))=f(2f(b)), so 2af(1)=2bf(1)⟹a=b, so f is injective.
P(x,0.5):f(xf(0.5)+f(0.5x))=f(x), so xf(0.5)+f(0.5x)=x. Therefore f(0.5x)=x−xf(0.5), so setting x→2x gives f(x)=2(1−f(0.5))x. Now, x=0.5 gives f(0.5)=1−f(0.5), so f(0.5)=0.5. Therefore, f(x)=x always, as desired.