Find $f: \mathbb{R} \to \mathbb{R}$ which satisfies $f(f(x)+xf(y))=x+yf(x).$
My attempt: \begin{align} P(0, y): \; & f(f(0))=yf(0)=0. \\ \Rightarrow \; & f(0)=0. \\ \ \\ P(x, 0): \; & f(f(x))=x. \\ \ \\ f(P(x, y)): \; & f(x)+xf(y)=f(x+yf(x)). \\ f(y) \to y: \; & f(x)+xy=f(x+f(x)f(y)). \tag 1 \label 1 \\ \ \\ P(-1, -1): \; & f(f(-1)-f(-1))=-1-f(-1). \\ \Rightarrow \; & f(-1)=-1. \\ \ \\ x \to -1 \text{ from } \color {#4995CF} {(\ref 1)}: \; & -1-y=f(-1-y). \\ y \to -x-1: \; & f(x)=x. \end{align}
I think I solved it, thanks for the help with the comments.