More specifically, there is an orthonormal basis of $X$ consisting of common eigenvectors.
So far, I've approached proving this by using the spectral theorem for compact, self-adjoint operators. I know that $S$ and $T$ can separately be diagonalized. I've also seen a hint that suggests considering the compact operator $S+ iT$, but this operator isn't self-adjoint, so the spectral theorem won't apply.
Any suggestions on how to proceed with this proof would be appreciated.
I've been informed that the trick is to note that the eigenspaces of $T$ are invariant under $S$ (or vice versa). And since, for the eigenvalues $\lambda_n$ of $T$, we can express the Hilbert space as $X = \bigoplus_{n=0}^\infty E_{\lambda_n}$, where $E_{\lambda_n}$ is the closed linear span of the eigenvectors associated with $\lambda_n$. It follows that we can express $S$ as $S = \bigoplus_{n=0}^\infty S\big|_{E_{\lambda_n}}$. The diagonalization of $S$ using eigenvectors of $T$ follows from there.