Since you must have
\begin{equation*}
\int_{x \in R} f(x) dx = 1
\end{equation*}
and since \(f(x)\) must be constant than all you must do is measure the accumulated width of the intervals in \(R\text{.}\) This is 5 + 1 + 6 = 12 and so
\begin{equation*}
f(x)=\left\{\begin{matrix}
\frac{1}{12}, & -2 \le x \le 3
\\ \frac{1}{12}, & 5 \le x \le 6
\\ \frac{1}{12}, & 9 \le x \le 15
\\ 0, & \text{otherwise}
\end{matrix}\right.
\end{equation*}
For the mean,
\begin{align*}
\int_{x \in R} x \frac{1}{12} dx & = \int_{-2}^3 \frac{x}{12} dx + \int_5^6 \frac{x}{12} dx + \int_9^{15} \frac{x}{12} dx\\
& = \frac{9-4}{24} + \frac{36-25}{24} + \frac{225-81}{24}\\
& = \frac{5+11+144}{24} = \frac{160}{24} = \frac{20}{3}.
\end{align*}
For the variance,
\begin{align*}
\int_{x \in R} x^2 \frac{1}{12} dx - \mu^2 & = \int_{-2}^3 \frac{x^2}{12} dx + \int_5^6 \frac{x^2}{12} dx + \int_9^{15} \frac{x^2}{12} dx - \mu^2\\
& = \frac{81+8}{36} + \frac{216-125}{36} + \frac{3375-729}{36} - \big ( \frac{20}{3} \big )^2\\
& = \frac{89+91+2646}{36} - \frac{400}{9} = \frac{2826-1600}{36} \\
& = \frac{1226}{36} \approx 34.055.
\end{align*}