$\def\R{\mathbf{R}}$ I've so far proved that the Weierstrass Approximation Theorem is true on $[-1.1]$. That is, a continuous function $f:[-1,1]\to\R$ can be uniformly approximated by polynomials. The final step is going from this special case to the general case of an arbitrary continuous function with domain $[a,b]$. Earlier in an exercise relating to uniformly approximating the absolute value function on a general interval, starting from a $[-1,1]$ approximation in hand, there was a trick that we used, to let $c=\max{(|a|,|b|)}$. And manipulate the terms using $f(x/c)$. I tried to use that similar trick. (Exercise 6.7.7(b) and 6.7.8(d), Understanding Analysis by Abbott, 2nd Edition for those curious).
Proof attempt. Let $f:[a,b]\to\R$ and let $\epsilon>0$. Let $c=\max(|a|,|b|)$. Now $f(x/c)$ is a function with inputs essentially in $[-1,1]$, so we can use the WAT for $[-1,1]$ to find a polynomial $p$ such that $$\bigg|p\bigg(\frac{x}{c}\bigg)-f\bigg(\frac{x}{c}\bigg)\bigg|\leq\frac{\epsilon}{c}.$$ Now multiplying both sides by $c$ we get, $$\bigg|c\cdot p\bigg(\frac{x}{c}\bigg)-c\cdot f\bigg(\frac{x}{c}\bigg)\bigg|\leq\epsilon.$$ Let $q$ be a polynomial on $[a,b]$ defined by $$q(x):=c\cdot p\bigg(\frac{x}{c}\bigg)$$. so we have $$\bigg|q(x)-c\cdot f\bigg(\frac{x}{c}\bigg)\bigg|\leq\epsilon.$$ I'm stuck now. Am I going in the right direction?
Looking at $f(\frac x c)$ does not work
Define $F:[-1,1]\to \mathbb R$ by $F(t)=f(a+\frac {(1+t)(b-a)} 2)$. Then $F$ is a continuous function on $[-1,1]$ so there is a polynomial $q$ such that $|F(x)-q(x)|<\epsilon$ for $-1 \leq t \leq 1$. Let $p(x)=q(\frac {2 {(x-a)}} {b-a}-1)$. Can you complete the proof?