I believe that this is a very beautiful problem
Solution:
Suppose that $x_1<x_2<...<x_{3n^2}$ be the elements of $X$ and $X_1={\{x_1,x_2,...,x_{n^2}}\} , X_2{\{x_1,x_2,...,x_{2n^2}}\} , X_3{\{x_1,x_2,...,x_{3n^2}}\}$ and for every $(a,b,c)\in X_1\times X_2\times X_3$ we define $f(a,b,c)=(b-a,c-b)$ then we have function $f$ s.t. $f: X_1\times X_2\times X_3 \rightarrow Y\subset {\{1,2,...,n^3}\}\times {\{1,2,...,n^3}\}$ and $Y$ is the set of ordered pair $(x,y)$ s.t. $x+y\leq n^3$. we know that $X_1\times X_2\times X_3$ has a $n^6$ elements and $Y$ has $\sum\limits_{x=1}^{n^3-1} (n^3-x)=n^6-n^3-\dfrac {(n^3-1)n^3}{2}=\dfrac {n^6-n^3}{2} <\dfrac {n^6}{2}$ elements, and it's obviuosly that there exist distinct triples pair $(a_1,a_2,a_3) , (a_4,a_5,a_6)$ and $(a_7,a_8,a_9)$ s.t. $a_3-a_2=a_6-a_5=a_9-a_8=x$ and $a_1-a_2=a_4-a_5=a_7-a_8=$ and we know that all of the numbers $a_1,...,a_9$ are distinct numbers .Because $a_1,a_2,a_3\in X_1 , a_4,a_5,a_6\in X_2$ and $a_7,a_8,a_9\in X_3$ and we can see that the system has an root $x_0=a_4-a_7 , y_0=a_7-a_1$ and $z_0=a_1-a_4$ and we are done