[proofplan]
We reduce the weighted problem to the ordinary uniform approximation problem by multiplying every function by the positive weight $w$. This multiplication is a linear isomorphism from $X$ onto its image subspace, preserves the Haar property because it preserves zero sets, and converts the weighted norm into the ordinary sup norm. The usual [Chebyshev alternation theorem for Haar spaces](/theorems/6882) then gives the desired alternating extremal points for the multiplied residual between $f$ and $p$, and this condition is exactly the displayed weighted alternation condition.
[/proofplan]
[step:Convert the weighted norm into the ordinary uniform norm]
Define the multiplication operator $M_w:C([a,b];\mathbb{R})\to C([a,b];\mathbb{R})$ by $(M_w g)(x):=w(x)g(x)$ for every $g\in C([a,b];\mathbb{R})$ and every $x\in[a,b]$.
Since $w$ and $g$ are continuous, $M_w g\in C([a,b];\mathbb{R})$. For every $g\in C([a,b];\mathbb{R})$, the identity
\begin{align*}
\|g\|_{\infty,w}=\max_{x\in[a,b]} |(M_w g)(x)|=\|M_w g\|_\infty
\end{align*}
holds. Thus, for every $q\in X$, $\|f-q\|_{\infty,w}=\|M_w f-M_w q\|_\infty$.
[/step]
[step:Show that the weighted image is again an $n$-dimensional Haar space]
Define $Y:=M_w(X)=\{M_w q:q\in X\}\subset C([a,b];\mathbb{R})$. The map $M_w|_X:X\to Y$ is linear and surjective by definition. It is injective because if $M_w q=0$, then $w(x)q(x)=0$ for every $x\in[a,b]$, and the strict positivity $w(x)>0$ gives $q(x)=0$ for every $x\in[a,b]$. Hence $\dim Y=\dim X=n$.
Let $h\in Y$ be non-zero. Choose $q\in X$ with $h=M_w q$. Since $M_w|_X$ is injective, $q\neq 0$. For every $x\in[a,b]$, one has $h(x)=0\iff w(x)q(x)=0\iff q(x)=0$. Thus $h$ and $q$ have exactly the same zero set in $[a,b]$. Because $X$ is a Haar space, $q$ has at most $n-1$ zeros in $[a,b]$, and therefore $h$ has at most $n-1$ zeros in $[a,b]$. Hence $Y$ is an $n$-dimensional Haar subspace of $C([a,b];\mathbb{R})$.
[/step]
[step:Transfer best approximation between $X$ and $Y$]
Define $F\in C([a,b];\mathbb{R})$ and $P\in Y$ by $F:=M_w f$ and $P:=M_w p$. By the norm identity from the first step and the definition of $Y$, one has $\inf_{q\in X}\|f-q\|_{\infty,w}=\inf_{Q\in Y}\|F-Q\|_\infty$. Also, $\|f-p\|_{\infty,w}=\|F-P\|_\infty$.
Therefore $p$ is a best weighted uniform approximant to $f$ from $X$ if and only if $P$ is a best ordinary uniform approximant to $F$ from $Y$.
[guided]
The point of introducing $M_w$ is that the weight disappears from the norm once it is absorbed into the functions. We set $F\in C([a,b];\mathbb{R})$ and $P\in Y$ by $F:=M_w f$ and $P:=M_w p$. The competitors $q\in X$ correspond exactly to the competitors $Q=M_w q\in Y$. This correspondence is bijective because $M_w|_X:X\to Y$ is a linear isomorphism.
For each $q\in X$, the weighted approximation error is $\|f-q\|_{\infty,w}=\max_{x\in[a,b]}w(x)|f(x)-q(x)|$. By the definition of $M_w$, this equals $\max_{x\in[a,b]}|(M_w f)(x)-(M_w q)(x)|=\|F-M_w q\|_\infty$. As $q$ ranges over $X$, the function $M_w q$ ranges over all of $Y$. Hence $\inf_{q\in X}\|f-q\|_{\infty,w}=\inf_{Q\in Y}\|F-Q\|_\infty$. Applying this identity to the particular element $p\in X$ gives $\|f-p\|_{\infty,w}=\|F-P\|_\infty$.
Thus the inequality saying that $p$ minimizes the weighted error over $X$ is precisely the inequality saying that $P$ minimizes the ordinary uniform error over $Y$.
[/guided]
[/step]
[step:Apply the ordinary alternation theorem and translate the condition back]
We use the Chebyshev Alternation Theorem for Haar Spaces in the following precise form: if $a<b$, $Y$ is an $n$-dimensional Haar subspace of $C([a,b];\mathbb{R})$, and $F\in C([a,b];\mathbb{R})$, then $P\in Y$ is a best ordinary uniform approximant to $F$ from $Y$ if and only if the residual $F-P$ alternates in sign at $n+1$ ordered extremal points. Its hypotheses apply to $Y$ because the theorem statement assumes $a<b$, the previous step showed that $Y$ is an $n$-dimensional Haar subspace of $C([a,b];\mathbb{R})$, and $F\in C([a,b];\mathbb{R})$ by definition.
By this theorem, $P$ is a best ordinary uniform approximant to $F$ from $Y$ if and only if there exist points $x_0,\dots,x_n\in[a,b]$ and a sign $\sigma\in\{-1,1\}$ such that $a\leq x_0<x_1<\cdots<x_n\leq b$ and, with $E_0:=\|F-P\|_\infty$, one has $(F-P)(x_i)=\sigma(-1)^iE_0$ for every $i\in\{0,\dots,n\}$.
Since $F-P=M_w(f-p)$, we have $(F-P)(x_i)=w(x_i)\bigl(f(x_i)-p(x_i)\bigr)$. Since $E_0=\|F-P\|_\infty=\|f-p\|_{\infty,w}=E$, the ordinary alternation condition is exactly $w(x_i)\bigl(f(x_i)-p(x_i)\bigr)=\sigma(-1)^iE$ for every $i\in\{0,\dots,n\}$.
[guided]
The final step is where the weighted theorem inherits the classical alternation criterion. We apply the Chebyshev Alternation Theorem for Haar Spaces to the interval $[a,b]$, the Haar space $Y$, the target function $F$, and the candidate approximant $P$. The theorem requires a nondegenerate interval, which is supplied by the hypothesis $a<b$; it requires $Y$ to be an $n$-dimensional Haar subspace of $C([a,b];\mathbb{R})$, which was proved above; and it requires $F\in C([a,b];\mathbb{R})$, which holds because $F=M_w f$ and both $w$ and $f$ are continuous.
Therefore $P$ is a best ordinary uniform approximant to $F$ from $Y$ if and only if there are points $x_0,\dots,x_n\in[a,b]$ and a sign $\sigma\in\{-1,1\}$ such that $a\leq x_0<x_1<\cdots<x_n\leq b$ and, with $E_0:=\|F-P\|_\infty$,
\begin{align*}
(F-P)(x_i)=\sigma(-1)^iE_0
\end{align*}
for every $i\in\{0,\dots,n\}$. Now translate this statement back through the multiplication map. Since $F=M_w f$ and $P=M_w p$, for every $x\in[a,b]$ we have
\begin{align*}
(F-P)(x)=w(x)(f(x)-p(x)).
\end{align*}
Also the norm identity from the first step gives
\begin{align*}
E_0=\|F-P\|_\infty=\|f-p\|_{\infty,w}=E.
\end{align*}
Substituting these two identities into the ordinary alternation condition gives
\begin{align*}
w(x_i)(f(x_i)-p(x_i))=\sigma(-1)^iE
\end{align*}
for every $i\in\{0,\dots,n\}$. This is exactly the weighted equioscillation condition in the theorem statement.
[/guided]
Combining this equivalence with the transfer of best approximation between $X$ and $Y$ proves both directions of the theorem.
[/step]