Suppose f(a)=f(b). Then f(a2)=f(f(a))=f(f(b))=f(b2) by step 1. Writing the original equation with y=a and with y=b gives f(x2+f(a))=f(f(x))+f(a2)+2f(xa) and f(x2+f(b))=f(f(x))+f(b2)+2f(xb). The left sides are equal (since f(a)=f(b)) and so are f(a2),f(b2); subtracting the two identities leaves 2f(xa)=2f(xb), i.e. f(ax)=f(bx) for every real x.