First, we will consider polynomials \(P(x)\) of degree less than \(n\) and write it as
\begin{equation*}
\begin{aligned}P(x)\amp = \sum_{k=1}^{n} P(x_{i}) \prod_{\stackrel{j=1}{j\neq k}}^{n} \frac{x-x_{j}}{x_{k}-x_{j}}\end{aligned}
\end{equation*}
with \(x_{k}\) as the roots of \(L_{n}(x)\text{.}\) This is the Lagrange form of the polynomial and since they are unique...
Integrating on \([-1,1]\text{,}\)
\begin{equation*}
\begin{aligned}\int_{-1}^{1} P(x) \, dx\amp = \int_{-1}^{1} \sum_{k=1}^{n} P(x_{k}) \prod{\stackrel{j=1}{j\neq k}}^{n} \frac{x-x_{j}}{x_{k}-x_{j}}\, dx \\\amp = \sum_{k=1}^{n} P(x_{k}) \int_{-1}^{1} \prod_{\stackrel{j=1}{j\neq k}}^{n} \frac{x-x_{j}}{x_{k}-x_{j}}\, dx \\\amp = \sum_{k=1}^{n} c_{k} P(x_{k})\end{aligned}
\end{equation*}
If \(P(x)\) has degree at least \(n\) and at most \(2n-1\text{,}\) then we divide \(P(x)\) by \(L_{n}(x)\) to get
\begin{equation*}
\begin{aligned}P(x)\amp = Q(x) L_{n}(x) + R(x)\end{aligned}
\end{equation*}
where \(L_{n}(x)\) is the \(n\)th degree Legendre polynomial. Note that at the Legendre roots,
\begin{equation*}
\begin{aligned}P(x_{k})\amp = Q(x_{k}) L_{n}(x_{k}) +R(x_{k}) = Q(x_{k}) \cdot 0 + R(x_{k}) = R(x_{k}).\end{aligned}
\end{equation*}
Since the Legendre polynomials are orthogonal to polynomials of degree less than \(n\text{,}\) then
\begin{equation*}
\begin{aligned}\int_{-1}^{1} Q(x) L_{n}(x) \, dx\amp = 0\end{aligned}
\end{equation*}
Also, since \(R(x)\) is a polynomial of degree less than \(n\text{,}\) therefore part 1 of the proof leads to
\begin{equation*}
\begin{aligned}\int_{-1}^{1} R(x) \, dx\amp = \sum_{k=1}^{n} c_{k} R(x_{k})\end{aligned}
\end{equation*}
Using these parts,
\begin{equation*}
\begin{aligned}\int_{-1}^{1} P(x) \, dx\amp = \int_{-1}^{1} \bigl( Q(x) L_{n}(x) + R(x) \bigr) \, dx = \int_{-1}^{1} R(x) \,dx = \sum_{k=1}^{n} c_{k} R(x_{k}) = \sum_{k=1}^{n} c_{k} P(x_{k})\end{aligned}
\end{equation*}