The following is the exercise #24 in chapter 4 of Stein's Real Analysis.
Let $\{e_k\}$ be an orthonormal set in a Hilbert space $\mathcal H$. If $\{c_k\}$ is a sequence of positive real numbers such that $\sum c_k^2<\infty$, then the set $$A = \left\{ \sum_{k=1}^{\infty} a_ke_k :|a_k|\leq c_k \right\}$$ is compact in $H$.
I refered to this page and below is my trial.
Let $S_0 = \{(a_1,a_2,a_3,...):a_k \in \mathbb C, \sum_{k=1}^{\infty} a_k e_k \in A \}$, $f_n = \sum_{k=1}^{\infty} a_{n,k}e_k \in A$, and $A_1 = \{a_{n,1} \}_n$. $|a_{n,1}| \le c_1 \forall n$, so $A_1$ is a bounded sequence in $\mathbb C$. Then, there is a subsequence $\{a_{n_j,1} \}_j$ such that $\lim_{j\to \infty}a_{n_j,1} = b_1\quad (|b_1| \le |c_1|)$.
Let $S_1 = \{(a_1,a_2,a_3,...):a_1 \in A_1, S_1 \subset S_0 \}$, and $A_2 = \{a_{n,2} \}_n$....
Continuing this process inducively, $S_m$ can be obtained $(m \in \mathbb N)$ so that $S_{m+1} \subset S_m$ and $\lim_{j\to \infty}a_{n_j,k} = b_k \quad (|b_k| \le |c_k|), k = 1,...,m$. $\{a_{n_j,k}\}_j$ is a sequence of kth element of $S_m$.
Let $f_{n_j} = \sum_{k=1}^{\infty} a_{n_j,k}e_k$, and $f = \sum_{k=1}^{\infty} b_k e_k$.
Then, $\Vert f_{n_j} - f \Vert = \Vert \sum_k (a_{n_j,k}-b_k)e_k \Vert \le \sum_k \Vert (a_{n_j,k}-b_k)e_k \Vert = \sum_k |a_{n_j,k}-b_k|$
After then, I wanted to show that $\lim_{j\to\infty} \Vert f_{n_j} - f \Vert = 0$, but I found it difficult to show $$\lim_{j\to\infty}\sum_{k=1}^{\infty}|a_{n_j,k}-b_k| = 0$$
Any comments about my trial, whether my approach is correct or not, some errors if exists, how to finish this, or other better ideas, would be appreciated. Thank you.