[proofplan]
We first derive the three-term recurrence for the orthogonal polynomial sequence, including the exact coefficients needed for telescoping. Then we evaluate that recurrence at two points $x$ and $y$, multiply by the opposite polynomial factor, subtract, and divide by the squared norm. The middle recurrence coefficient cancels, and the two neighbouring terms form a telescoping difference. Summing from $j=0$ to $n$ leaves only the boundary term involving $p_{n+1}$ and $p_n$.
[/proofplan]
[step:Derive the three-term recurrence with the correct boundary coefficients]
For each $j\geq 0$, the polynomial $t p_j(t)$ has degree $j+1$, so it has a unique expansion in the basis $p_0,\dots,p_{j+1}$. Orthogonality implies that all coefficients of $p_0,\dots,p_{j-2}$ vanish, because if $0\leq m\leq j-2$, then $t p_m(t)$ has degree at most $j-1$ and hence is a linear combination of $p_0,\dots,p_{j-1}$. Therefore
\begin{align*}
\int_I t p_j(t)p_m(t)w(t)\,d\mathcal{L}^1(t)=\int_I p_j(t)\bigl(t p_m(t)\bigr)w(t)\,d\mathcal{L}^1(t)=0.
\end{align*}
Thus there are [real numbers](/page/Real%20Numbers) $A_j,B_j,C_j$ such that
\begin{align*}
t p_j(t)=A_jp_{j+1}(t)+B_jp_j(t)+C_jp_{j-1}(t),
\end{align*}
where $p_{-1}$ denotes the zero polynomial and hence $C_0p_{-1}=0$.
Comparing leading coefficients gives
\begin{align*}
A_j=\frac{k_j}{k_{j+1}}.
\end{align*}
For $j\geq 1$, taking the [inner product](/page/Inner%20Product) of the recurrence with $p_{j-1}$ gives
\begin{align*}
C_jh_{j-1}=\int_I t p_j(t)p_{j-1}(t)w(t)\,d\mathcal{L}^1(t).
\end{align*}
By symmetry of multiplication by $t$ under this integral,
\begin{align*}
\int_I t p_j(t)p_{j-1}(t)w(t)\,d\mathcal{L}^1(t)=\int_I p_j(t)\bigl(t p_{j-1}(t)\bigr)w(t)\,d\mathcal{L}^1(t).
\end{align*}
The coefficient of $p_j$ in the expansion of $t p_{j-1}(t)$ is $k_{j-1}/k_j$, so orthogonality gives
\begin{align*}
\int_I p_j(t)\bigl(t p_{j-1}(t)\bigr)w(t)\,d\mathcal{L}^1(t)=\frac{k_{j-1}}{k_j}h_j.
\end{align*}
Hence, for $j\geq 1$,
\begin{align*}
C_j=\frac{k_{j-1}h_j}{k_jh_{j-1}}.
\end{align*}
Consequently, for every $j\geq 0$,
\begin{align*}
t p_j(t)=\frac{k_j}{k_{j+1}}p_{j+1}(t)+B_jp_j(t)+\frac{k_{j-1}h_j}{k_jh_{j-1}}p_{j-1}(t),
\end{align*}
with the last term interpreted as $0$ when $j=0$.
[/step]
[step:Subtract the recurrences at $x$ and $y$ to create a telescoping identity]
Fix $x,y\in\mathbb{R}$ with $x\neq y$. For $j\geq 0$, evaluate the recurrence at $t=x$ and multiply by $p_j(y)/h_j$, then evaluate it at $t=y$ and multiply by $p_j(x)/h_j$. Subtracting the second identity from the first cancels the $B_j$ terms and gives
\begin{align*}
(x-y)\frac{p_j(x)p_j(y)}{h_j}=\frac{k_j}{k_{j+1}h_j}\bigl(p_{j+1}(x)p_j(y)-p_j(x)p_{j+1}(y)\bigr)-\frac{k_{j-1}}{k_jh_{j-1}}\bigl(p_j(x)p_{j-1}(y)-p_{j-1}(x)p_j(y)\bigr).
\end{align*}
Define $R_{-1}(x,y)=0$, and for $j\geq 0$ define
\begin{align*}
R_j(x,y)=\frac{k_j}{k_{j+1}h_j}\bigl(p_{j+1}(x)p_j(y)-p_j(x)p_{j+1}(y)\bigr).
\end{align*}
Then the preceding identity is exactly
\begin{align*}
(x-y)\frac{p_j(x)p_j(y)}{h_j}=R_j(x,y)-R_{j-1}(x,y).
\end{align*}
[guided]
The purpose of the subtraction is to remove the middle coefficient $B_j$, whose explicit value is irrelevant to the Christoffel-Darboux formula. For a fixed $j\geq 0$, the recurrence at $x$ is
\begin{align*}
x p_j(x)=\frac{k_j}{k_{j+1}}p_{j+1}(x)+B_jp_j(x)+\frac{k_{j-1}h_j}{k_jh_{j-1}}p_{j-1}(x),
\end{align*}
with the last term understood as $0$ when $j=0$. Multiplying by $p_j(y)/h_j$ gives an identity whose left-hand side is $x p_j(x)p_j(y)/h_j$. The same recurrence at $y$, multiplied by $p_j(x)/h_j$, has left-hand side $y p_j(y)p_j(x)/h_j$. Subtracting therefore produces the desired factor
\begin{align*}
(x-y)\frac{p_j(x)p_j(y)}{h_j}.
\end{align*}
The $B_j$ contribution cancels because it appears as
\begin{align*}
B_j\frac{p_j(x)p_j(y)}{h_j}-B_j\frac{p_j(y)p_j(x)}{h_j}=0.
\end{align*}
The remaining upper-neighbour term is
\begin{align*}
\frac{k_j}{k_{j+1}h_j}\bigl(p_{j+1}(x)p_j(y)-p_j(x)p_{j+1}(y)\bigr),
\end{align*}
and the lower-neighbour term is
\begin{align*}
\frac{k_{j-1}}{k_jh_{j-1}}\bigl(p_{j-1}(x)p_j(y)-p_j(x)p_{j-1}(y)\bigr).
\end{align*}
Writing the lower-neighbour term with the opposite order inside the parentheses changes its sign, so if
\begin{align*}
R_j(x,y)=\frac{k_j}{k_{j+1}h_j}\bigl(p_{j+1}(x)p_j(y)-p_j(x)p_{j+1}(y)\bigr)
\end{align*}
and $R_{-1}(x,y)=0$, the whole subtraction becomes the compact difference identity
\begin{align*}
(x-y)\frac{p_j(x)p_j(y)}{h_j}=R_j(x,y)-R_{j-1}(x,y).
\end{align*}
This is the exact form needed for telescoping when $j$ is summed from $0$ to $n$.
[/guided]
[/step]
[step:Sum the telescoping identity and divide by $x-y$]
Summing
\begin{align*}
(x-y)\frac{p_j(x)p_j(y)}{h_j}=R_j(x,y)-R_{j-1}(x,y)
\end{align*}
over $j=0,\dots,n$ gives
\begin{align*}
(x-y)\sum_{j=0}^{n}\frac{p_j(x)p_j(y)}{h_j}=R_n(x,y)-R_{-1}(x,y).
\end{align*}
Since $R_{-1}(x,y)=0$, this becomes
\begin{align*}
(x-y)\sum_{j=0}^{n}\frac{p_j(x)p_j(y)}{h_j}=\frac{k_n}{k_{n+1}h_n}\bigl(p_{n+1}(x)p_n(y)-p_n(x)p_{n+1}(y)\bigr).
\end{align*}
Because $x\neq y$, division by $x-y$ is valid, and therefore
\begin{align*}
\sum_{j=0}^{n}\frac{p_j(x)p_j(y)}{h_j}=\frac{k_n}{k_{n+1}h_n}\frac{p_{n+1}(x)p_n(y)-p_n(x)p_{n+1}(y)}{x-y}.
\end{align*}
This is the Christoffel-Darboux formula.
[/step]