Let $\lbrace u_{1}, ..., u_{n} \rbrace$ an orthonormal basis of $\mathbb{R}^{n}$, then $\displaystyle x = \sum_{i=1}^{n}\langle x, u_{i} \rangle u_{i}$ for all $x \in \mathbb{R}^{n}$.
I know that $\langle u_{i}, u_{i} \rangle = 1$ and $\langle u_{i}, u_{j} \rangle = 0$ if $i \neq j$, but I don't know how to use this information in this question. I didn't want the solution, just a hint.
Hint: Write $x=x_1u_1+\dots+x_nu_n$ and take its inner product with $u_i$.