I am quite proud of this solution. For the sake of being self-contained, the functional equation we are tasked to solve is
$$
f(xf(x) + 2y) = f(x^2) + f(y) + x + y - 1.
$$
Plugging in $x = y = 0$ gives us that
$$
f(0) = 2f(0) - 1 \quad \text{and thus} \quad f(0) = 1.
$$
Plugging in $x = 0$ then gives us that
$$
f(2y) = f(y) + y, \qquad (*)
$$
so we may rewrite our functional equation to
$$
f(xf(x) + 2y) = f(x^2) + f(2y) + x - 1.
$$
Plugging in $y = 0$ gives us that
$$
f(xf(x)) = f(x^2) + x \qquad (**)
$$
and so we may further rewrite our functional equation to
$$
f(xf(x) + 2y) = f(xf(x)) + f(2y) - 1.
$$
We plug in $y = -xf(x)$. We find that
$$
f(-xf(x)) = f(xf(x)) + f(-2xf(x)) - 1 = f(xf(x)) + f(-xf(x)) - xf(x) - 1,
$$
where we used $(*)$. We may rewrite this to
$$
f(xf(x)) = xf(x) + 1.
$$
This means that on the set $A = \{ xf(x) \mid x \in \mathbb{R} \}$, the function $f$ is identically equal to $x+1$.
Our functional equation can thus further be rewritten to
$$
f(xf(x) + 2y) = xf(x) + f(2y), \qquad (***)
$$
Note that we may now also simplify $(**)$ to
$$
xf(x) + 1 = f(x^2) + x.
$$
Plugging in $-x$ for $x$ here gives us that
$$
-xf(-x) + 1 = f(x^2) - x,
$$
and so subtracting these two, we find that
$$
xf(x) - ( -xf(-x) ) = 2x.
$$
This means that for any $x \in \mathbb{R}$, there exist $a,a' \in A$ with $a - a' = 2x$. There is no necessity for this additional notation, but it will make the final stretch less messy. For any $x \neq 0$, we may divide by it to also find that
$$
f(x) + f(-x) = 2.
$$
Note that this also holds for $x = 0$, so it holds for all $x \in \mathbb{R}$.
Set $B = \{ x \in \mathbb{R} \mid f(x) = x+1 \}$. We show that $B = \mathbb{R}$. We have seen that $A \subset B$ and the above shows that also $-A \subset B$. Now, let $x \in \mathbb{R}$ be arbitrary and write $2x = a - a'$ for some $a, a' \in A$ as above. Set $xf(x) = a$ and $2y = -a'$ in $(***)$. It gives us that
$$
f(2x) = f(a + (-a')) = a + f(-a') = a - a' + 1 = 2x+1.
$$
Since $x \in \mathbb{R}$ was arbitrary, we are done.