[tex]f_X(x)=\begin{cases}\dfrac1{45-20}=\dfrac1{25}&\text{for }20\le x\le45\\0&\text{otherwise}\end{cases}[/tex]
The mean is given by
[tex]\displaystyle\mathbb E(X)=\int_{-\infty}^\infty x f_X(x)\,\mathrm dx=\int_{20}^{45}\dfrac x{25}\,\mathrm dx=\dfrac{65}2[/tex]