Determine all functions $f: \mathbb{R} \times \mathbb{R} \to \mathbb{R}$ such that
\[ f(x,y) + f(y,z) + f(z,x) = \max \{ x,y,z \} - \min \{ x,y,z \} \] for every $x,y,z \in \mathbb{R}$
and there exists some real $a$ such that $f(x,a) = f(a,x) $ for every $x \in \mathbb{R}$.
1. **Define the assertion**: Let \( P(x, y, z) \) be the assertion of the given functional equation:
   \[
   f(x, y) + f(y, z) + f(z, x) = \max \{ x, y, z \} - \min \{ x, y, z \}
   \]
   for all \( x, y, z \in \mathbb{R} \).

2. **Check a potential solution**: Consider the function \( f(x, y) = \left| \frac{x - y}{2} \right| \). We need to verify if this function satisfies the given functional equation.

3. **Verify the potential solution**:
   \[
   f(x, y) = \left| \frac{x - y}{2} \right|, \quad f(y, z) = \left| \frac{y - z}{2} \right|, \quad f(z, x) = \left| \frac{z - x}{2} \right|
   \]
   We need to show:
   \[
   \left| \frac{x - y}{2} \right| + \left| \frac{y - z}{2} \right| + \left| \frac{z - x}{2} \right| = \max \{ x, y, z \} - \min \{ x, y, z \}
   \]

4. **Simplify the left-hand side**:
   \[
   \left| \frac{x - y}{2} \right| + \left| \frac{y - z}{2} \right| + \left| \frac{z - x}{2} \right|
   \]
   This expression represents the sum of the absolute differences between each pair of \( x, y, z \) divided by 2.

5. **Analyze the right-hand side**:
   \[
   \max \{ x, y, z \} - \min \{ x, y, z \}
   \]
   This expression represents the range of the values \( x, y, z \).

6. **Case analysis**:
   - **Case 1**: \( x = y = z \)
     \[
     f(x, x) + f(x, x) + f(x, x) = 0 = \max \{ x, x, x \} - \min \{ x, x, x \}
     \]
     This holds true since both sides are zero.

   - **Case 2**: \( x \leq y \leq z \)
     \[
     \left| \frac{x - y}{2} \right| + \left| \frac{y - z}{2} \right| + \left| \frac{z - x}{2} \right| = \frac{y - x}{2} + \frac{z - y}{2} + \frac{z - x}{2} = \frac{z - x}{2} + \frac{z - x}{2} = z - x
     \]
     \[
     \max \{ x, y, z \} - \min \{ x, y, z \} = z - x
     \]
     This holds true since both sides are equal to \( z - x \).

   - **Case 3**: \( x \leq z \leq y \)
     \[
     \left| \frac{x - y}{2} \right| + \left| \frac{y - z}{2} \right| + \left| \frac{z - x}{2} \right| = \frac{y - x}{2} + \frac{y - z}{2} + \frac{z - x}{2} = \frac{y - x}{2} + \frac{y - x}{2} = y - x
     \]
     \[
     \max \{ x, y, z \} - \min \{ x, y, z \} = y - x
     \]
     This holds true since both sides are equal to \( y - x \).

   - **Case 4**: \( y \leq x \leq z \)
     \[
     \left| \frac{x - y}{2} \right| + \left| \frac{y - z}{2} \right| + \left| \frac{z - x}{2} \right| = \frac{x - y}{2} + \frac{z - y}{2} + \frac{z - x}{2} = \frac{z - y}{2} + \frac{z - y}{2} = z - y
     \]
     \[
     \max \{ x, y, z \} - \min \{ x, y, z \} = z - y
     \]
     This holds true since both sides are equal to \( z - y \).

7. **Uniqueness**: To show that \( f(x, y) = \left| \frac{x - y}{2} \right| \) is the unique solution, we use the given condition \( f(x, a) = f(a, x) \) for some real \( a \) and for all \( x \in \mathbb{R} \).

8. **Using the given condition**:
   \[
   P(x, x, x): f(x, x) = 0
   \]
   \[
   P(x, x, a): f(x, a) + f(a, x) = \left| \frac{x - a}{2} \right| + \left| \frac{a - x}{2} \right| = \left| \frac{x - a}{2} \right| = \frac{|x - a|}{2}
   \]
   This shows that \( f(x, a) = \frac{|x - a|}{2} \).

9. **Generalize for all \( x, y \)**:
   \[
   P(a, y, z): \left| \frac{y - a}{2} \right| + \left| \frac{z - a}{2} \right| + f(y, z) = \max \{ a, y, z \} - \min \{ a, y, z \}
   \]
   By analyzing different cases as done above, we can conclude that \( f(y, z) = \left| \frac{y - z}{2} \right| \).

Thus, the only solution is:
\[
\boxed{f(x, y) = \left| \frac{x - y}{2} \right|}
\]