As some background information:
Chinese Remainder Theorem: Let $R$ be a commutative ring and $\{I_k\}_{k\geq1}$ be pairwise coprime ideals in $R$. Chinese Remainder Theorem claims that $R/I_1\cap...\cap I_k\cong (R/I_1) \times...\times(R/I_k).$
Polynomial interpolation: claims that for pairwise distinct $\lambda_k$, $k=1,2,...,n$, $\lambda_i\in\mathbb{F}$ for some field. Then for $a_i$, $i=1,...,n,$ there exists a polynomial $p\in \mathbb{F}[x]$ such that $p(\lambda_i)=a_i$ for each i.
The proof I was given goes as follows:
Since $\lambda_k$ are pairwise distinct then $\langle X-\lambda_k\rangle$ are pairwise coprime. So we can apply CRT here to obtain: $\mathbb{F}[x]/\langle X-\lambda_1\rangle \cap...\cap \langle X-\lambda_n\rangle \cong (\mathbb{F}[x]/\langle X-\lambda_1\rangle) \times...\times(\mathbb{F}[x]/\langle X-\lambda_n\rangle).$ Then there is a polynomial $p(X)\in \mathbb{F}[x]/\langle X-\lambda_1\rangle\cap...\cap \langle X-\lambda_n\rangle$ such that p(X)$\in$ $a_i$+$\langle X-\lambda_i\rangle $ for each $i$.
My issue here lies within the last sentence (Italic one).
Firstly why does it even imply there exists $p(X)$ that has the declared property ($p(X)\in$ $a_i$+$\langle X-\lambda_i\rangle $ for each $i$)? Secondly why would such $p(X)$ has the required property in the theorem? Is it really as simple as $p(\lambda_k)\in a_i+\langle \lambda_i-\lambda_i\rangle=a_i?$
I hope I didnt explain this too messily and any help is much appreciated!