Let $k$ be a positive real number. Determine all functions $f:[-k, k]\rightarrow[0, k]$ satisfying the equation
$$f(x)^2+f(y)^2-2xy=k^2+f(x+y)^2$$
for any $x, y\in[-k, k]$ such that $x+y\in[-k, k]$.

[i]Proposed by Maximiliano Sánchez[/i]
1. **Define the function \( g(x) \):**
   Let \( g(x) = f(x)^2 + x^2 \). Given that \( f(x) \) maps from \([-k, k]\) to \([0, k]\), we have:
   \[
   0 \leq f(x) \leq k \implies 0 \leq f(x)^2 \leq k^2
   \]
   Therefore,
   \[
   0 \leq g(x) = f(x)^2 + x^2 \leq k^2 + k^2 = 2k^2
   \]
   This shows that \( g(x) \) is bounded.

2. **Transform the original equation:**
   Substitute \( g(x) \) into the given functional equation:
   \[
   f(x)^2 + f(y)^2 - 2xy = k^2 + f(x+y)^2
   \]
   Using \( g(x) = f(x)^2 + x^2 \), we get:
   \[
   g(x) + g(y) - 2x^2 - 2y^2 = k^2 + f(x+y)^2
   \]
   Simplifying, we have:
   \[
   g(x) + g(y) - 2xy = k^2 + g(x+y) - (x+y)^2
   \]
   Since \( g(x) = f(x)^2 + x^2 \), we can rewrite the equation as:
   \[
   g(x) + g(y) = k^2 + g(x+y)
   \]

3. **Introduce a new function \( h(x) \):**
   Define \( h(x) = g(x) - g(0) \). Then the equation becomes:
   \[
   h(x) + h(y) = h(x+y)
   \]
   This is Cauchy's functional equation. Given that \( h(x) \) is bounded (since \( g(x) \) is bounded), we can conclude that \( h(x) \) is linear. Therefore, there exist constants \( a \) and \( b \) such that:
   \[
   h(x) = ax + b
   \]

4. **Express \( g(x) \) in terms of \( h(x) \):**
   Since \( h(x) = g(x) - g(0) \), we have:
   \[
   g(x) = h(x) + g(0) = ax + b + g(0)
   \]
   Let \( c = b + g(0) \), then:
   \[
   g(x) = ax + c
   \]

5. **Determine \( f(x) \):**
   Recall that \( g(x) = f(x)^2 + x^2 \), so:
   \[
   f(x)^2 + x^2 = ax + c
   \]
   Solving for \( f(x) \), we get:
   \[
   f(x)^2 = ax + c - x^2
   \]
   For \( f(x) \) to be real-valued, the right-hand side must be non-negative:
   \[
   ax + c - x^2 \geq 0
   \]
   Therefore, the function \( f(x) \) is:
   \[
   f(x) = \sqrt{ax + c - x^2}
   \]

6. **Determine the bounds for \( a \) and \( c \):**
   Since \( f(x) \) maps to \([0, k]\), we need:
   \[
   0 \leq \sqrt{ax + c - x^2} \leq k
   \]
   This implies:
   \[
   0 \leq ax + c - x^2 \leq k^2
   \]
   For all \( x \in [-k, k] \).

The final answer is \( \boxed{ f(x) = \sqrt{ax + c - x^2} } \) where \( a \) and \( c \) are constants such that \( 0 \leq ax + c - x^2 \leq k^2 \) for all \( x \in [-k, k] \).