This is one of my practice problems, which may be solved with a substitution.
Find all functions $ f : \mathbb R \to \mathbb R $ which verify the relation $$ ( x - 2 ) f ( y ) + f \big( y + 2 f ( x ) \big) = f \big( x + y f ( x ) \big) $$ for all $ x , y \in \mathbb R $.
I have tried to find whether such function is surjective, or injective, but unsuccessfully.
You can show that the only functions $ f : \mathbb R \to \mathbb R $ satisfying $$ ( x - 2 ) f ( y ) + f \big( y + 2 f ( x ) \big) = f \big( x + y f ( x ) \big) \tag 0 \label 0 $$ for all $ x , y \in \mathbb R $ are those of the form $ f ( x ) = 0 $ and $ f ( x ) = x - 1 $. It's straightforward to verify that these are indeed solutions. To see the converse, let $ a = f ( 0 ) $ and $ b = f ( 2 ) $. Setting $ y = 0 $ in \eqref{0} gives $$ a ( x - 2 ) = f ( x ) - f \big( 2 f ( x ) \big) \text , \tag 1 \label 1 $$ while putting $ x = 2 $ in \eqref{0} shows that $$ f ( y + 2 b ) = f ( b y + 2 ) \text . \tag 2 \label 2 $$ By respectively setting $ x = y + 2 b $ and $ x = b y + 2 $ in \eqref{1} and using \eqref{2} you get $ a ( y + 2 b - 2 ) = a b y $, which for $ y = 3 $ can be simplified to $ a ( b - 1 ) = 0 $.
Now, assume that for some $ x _ 0 \ne 1 $ we have $ f ( x _ 0 ) = 0 $. Setting $ x = x _ 0 $ in \eqref{0} you can see that $ f $ will be the constant zero function, which is one of the mentioned solutions. This, in particular, happens if we take $ x _ 0 = 0 $, which settles the case $ a = 0 $. So, from now on, assume that we have $ b = 1 $. This, in particular, shows that you can't have $ a = 0 $, as then $ f $ must be constantly zero, which contradicts $ b = 1 $.
Consider any $ x _ 1 $ with $ f ( x _ 1 ) = 1 $. By the facts that $ b = 1 $ and $ a $ cannot be equal to zero, you can put $ x = x _ 1 $ in \eqref{1} to see that you must have $ x _ 1 = 2 $. This means that for any $ x \ne 2 $ you have $ f ( x ) \ne 1 $, and you can let $ y = \frac { 2 f ( x ) - x } { f ( x ) - 1 } $ in \eqref{0}. In that case, you'll have $ y + 2 f ( x ) = x + y f ( x ) = \frac { 2 f ( x ) ^ 2 - x } { f ( x ) - 1 } $, and since $ x \ne 2 $, \eqref{0} gives you $ f \left( \frac { 2 f ( x ) - x } { f ( x ) - 1 } \right) = 0 $. As $ f $ is not constantly zero, by the above argument we must have $ \frac { 2 f ( x ) - x } { f ( x ) - 1 } = 1 $, which can be simplified to $ f ( x ) = x - 1 $. We also have $ b = 2 - 1 $, and hence we can conclude that $ f ( x ) = x - 1 $ for all $ x \in \mathbb R $, which gives the other mentioned solution, and we're done.