Find all functions $f: R \to R$ and $g:R \to R$ such that $f(x-f(y))=xf(y)-yf(x)+g(x)$ for all real numbers $x,y$.

I.Voronovich
We are given the functional equation:
\[ f(x - f(y)) = x f(y) - y f(x) + g(x) \]
for all real numbers \( x \) and \( y \). We need to find all functions \( f: \mathbb{R} \to \mathbb{R} \) and \( g: \mathbb{R} \to \mathbb{R} \) that satisfy this equation.

### Case 1: \( f(0) = 0 \)

1. **Substitute \( y = 0 \) into the functional equation:**
   \[ f(x - f(0)) = x f(0) - 0 f(x) + g(x) \]
   Since \( f(0) = 0 \), this simplifies to:
   \[ f(x) = g(x) \]
   Therefore, \( f(x) = g(x) \) for all \( x \).

2. **Substitute \( x = 0 \) into the functional equation:**
   \[ f(0 - f(y)) = 0 f(y) - y f(0) + g(0) \]
   Since \( f(0) = 0 \) and \( f(x) = g(x) \), this simplifies to:
   \[ f(-f(y)) = 0 \]
   This implies that \( f(-f(y)) = 0 \) for all \( y \).

3. **Substitute \( y = -f(x) \) into the functional equation:**
   \[ f(x - f(-f(x))) = x f(-f(x)) + g(x) \]
   Since \( f(-f(x)) = 0 \), this simplifies to:
   \[ f(x) = g(x) \]
   Therefore, \( f(x) = 0 \) for all \( x \).

Thus, in this case, \( f(x) = 0 \) and \( g(x) = 0 \).

### Case 2: \( f(0) \neq 0 \)

1. **Substitute \( x = 0 \) into the functional equation:**
   \[ f(0 - f(y)) = 0 f(y) - y f(0) + g(0) \]
   This simplifies to:
   \[ f(-f(y)) = -y f(0) + g(0) \]
   Since \( f \) is bijective (as \( f(0) \neq 0 \)), there exists some \( c \) such that \( f(c) = 0 \).

2. **Substitute \( x = c \) into the functional equation:**
   \[ f(c - f(y)) = c f(y) - y f(c) + g(c) \]
   Since \( f(c) = 0 \), this simplifies to:
   \[ f(c - f(y)) = c f(y) + g(c) \]
   Since \( f \) is surjective, we can assume \( f \) is linear. Let \( f(x) = ax + b \).

3. **Substitute \( f(x) = ax + b \) into the original equation:**
   \[ a(x - ay - b) + b = x(ay + b) - y(ax + b) + g(x) \]
   Simplifying, we get:
   \[ ax - a^2 y - ab + b = axy + xb - axy - yb + g(x) \]
   \[ ax - a^2 y - ab + b = xb - yb + g(x) \]
   Comparing coefficients, we get:
   \[ a = 1, \quad -a^2 = 0, \quad -ab + b = 0 \]
   This implies \( a = 1 \) and \( b = 0 \).

Thus, \( f(x) = x \) and \( g(x) = 0 \).

### Conclusion
The only solutions are:
1. \( f(x) = 0 \) and \( g(x) = 0 \)
2. \( f(x) = x \) and \( g(x) = 0 \)

The final answer is \( \boxed{ f(x) = 0 } \) and \( g(x) = 0 \) or \( f(x) = x \) and \( g(x) = 0 \).