Solution by OronSH.
The solutions are
f(x)=0,f(x)=x,f(x)=−x.
The zero function works. Now assume f is not identically zero. If f(a)=0 for some a=0, then P(a,y) gives f(ay)=f(0) for every y, so f is constant, impossible. Hence 0 is the unique zero. Also P(−f(0),0) gives f(−f(0))=0, so f(0)=0.
Putting y=1 in
P(−f(y),y)
gives
f(−f(1))2=−f(−f(1)).
The value f(−f(1)) cannot be 0, so it is −1. Thus −1 is in the range. Moreover, if f(d)=−1, then P(d,1) gives
f(−d−f(1))=0,
so d=−f(1). Therefore −1 has the unique preimage c=−f(1).
If f(a)=f(b) with a,b=0, comparing
P(ac,a)andP(ac,b)
gives f(bc/a)=−1, hence bc/a=c and a=b. Thus f is injective.
Now P(1,0) and P(c,0) give
f(f(1))=f(1)2=1,
so f(1)=±1, and in either case f(−1)=−f(1). Comparing P(1,y) and P(−1,−y) then gives f(−y)=−f(y).
Using P(−f(x),x) together with oddness and P(x,0) yields
f(−f(x))2=f(x)2.
Therefore f(−f(x))=±f(x). By injectivity and oddness, this implies pointwise
f(x)∈{x,−x}.
Thus f is surjective. If f(1)=1, then P(1,y) and surjectivity give f(t+1)=t+1 for all t, hence f(x)=x. If f(1)=−1, the same equation gives f(−1−t)=1+t, hence f(x)=−x. The listed functions all work.