Problem: Solve over $\RR$ the functional equation
\[ f\left( yf(x + y) + f(x) \right) = 4x + 2yf(x + y). \]

Solution: The only solution is $f(x) \equiv 2x$ which obviously works.

Let $P(x,y)$ be the given condition. Then:
\begin{itemize}
  \ii Note $P(x,0) \implies f(f(x)) = 4x$; in particular $f$ is bijective.
  \begin{itemize}
    \ii \dots This also implies $f(4x) = f(f(f(x))) = 4f(x)$.
    \ii Taking $x=0$ gives $f(0) = 4f(0) \implies f(0) = 0$.
  \end{itemize}
  \ii Now $P(0,2) \implies f(2f(2)) = 4f(2) = f(8) \implies f(2) = 4$.
  \ii Then $P(0,1) \implies f(f(1)) = 2f(1) \implies 4 = 2f(1) \implies f(1)=2$.
  \ii Finally, $P(x,1-x)$ gives
  \[ f\left( 2(1-x) + f(x) \right) = 4x + 4(1-x) = 4. \]
  Since $f$ is a bijection and $f(2) = 4$, this means $2(1-x)+f(x) = 2$,
  so $f(x) = 2x$ as desired.
\end{itemize}