(Exercise 3.5.2 in Analysis by Tao) Suppose we define an ordered $n$-tuple to be a surjective function $x: \{ i \in \mathbb{N}: 1 \le i \le n\} \to X$ whose range is some arbitrary set $X$ (so different ordered $n$- tuples are allowed to have different ranges); we then write $x_i$ for $x(i)$, and also write $x$ as $(x_i)_{1\le i\ \le n}$. Using this definition, verify that we have $(x_i)_{1\le i\ \le n} = (y_i)_{1\le i\ \le n}$ if and only if $x_i = y_i$ for all $1 \le i \le n$.
This question seems not difficult, but I am struggling with it. I especially don't know how to use the surjective condition given. Any help would be appreciated.