Let $g(x)=2x+x\cos x-3\sin x.$ Let $g^i$ denote the $i$th derivative of $g$.
We have $g(0)=g^1(0)=g^2(0)=g^3(0)=g^4(0)=0 .$ And $g^5(x)=2\cos x-x\sin x,$ so $\lim_{x\to 0}g^5(x)=2.$
For any $r>0$ take $s>0$ such that $|x|<s\implies 2-r<g^5(x)<2+r.$
Now for $0\leq x<r$ we have $g^4(x)=g^4(x)-g^4(0)=\int_0^xg^5(y)dy,$ so $$(2-r)x\leq g^4(x)\leq(2+r)x .$$ We have $g^3(x)=g^3(x)-g^3(0)=\int_0^x g(y)dy,$ which is bounded above and below by $\int_0^x(2\pm r)y\;dy.$ That is, $$(2-r)x^2/2\leq g^3(x)\leq (2+r)x^2/2.$$ Continuing in this manner for three more steps, we obtain $$x^5(2-r)/120\leq g(x)\leq x^5(2+r)/120$$ for $0\leq x<s.$ Similarly $$x^5(2+r)/120\leq g(x)\leq x^5(2-r)/120$$ for $-s<x<0.$
I assume we do not have to prove that $\lim_{x\to 0}x/\sin x=1.$
For $x\ne 0$ we have $f(x)=(g(x)/x^4)(x/\sin x).$ So we should define $f(0)=0$ to make $f$ continuous at $0.$