Knowing that the density of a uniform random variable on $[0,1]$ is:
$f_{U}=\left\{\begin{matrix} 1 & x\in [0,1]\\ 0 & x\notin[0,1] \end{matrix}\right.$
How to determine the density of a uniformly distributed random variable on $[a,b]$ using change of variable?
Denote the described variable by x. Construct new variable y as $y = (b-a)x+a$
For any value z, The cumulative density function $F(y \leq z) = F(x \leq \frac{z-a}{b-a}) = \begin{cases} 0, \, z< a\\ (z-a)/(b-a), \, z \in [a,b]\\ 1, \, z > b \end{cases} $
Take the derivative of cdf with respect to z, the pdf $f(y=z) = \begin{cases} 1/(b-a), z \in [a,b]\\ 0, otherwise \end{cases}$