Question: If $f(x)= x^3 + 3x^2 + 12x - 2\sin x$ where $f:\mathbb R \to \mathbb R$, then prove that $f(x)$ is one-one and onto.

Answer: 
$$
4.5\leq 2x+1<5.5
\implies 1.75\leq x < 2.25
$$
Since it's uniform, the desired probability is the derived interval compared to the total sample space.
$$
P(1.75\leq x < 2.25) = \frac{2.25-1.75}{10} =\frac{0.5}{10} = \boxed{0.05}.
$$
You are right
Dividing by $2$ you get
$$2.25 \le x <2.75$$
This is intreval of length 0.5 and random number can be in an interval of length 10.
So probability is
$$
p = 0.5/10 = 0.05$$