Find $(a,b)$ such that $\lim\limits_{x\to 0}\frac{f(x)}{x}=1$ implies $\lim\limits_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{(f(x))^3}=1$ 
Let $f$ denote any function such that $\lim\limits_{x\to 0}\frac{f(x)}{x}=1$. Find the value of $a$ and $b$, assuming that $\lim\limits_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{(f(x))^3}=1$.

My  attempt:
$\lim_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{(f(x))^3}=1$
$\lim_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{x^3\frac{(f(x))^3}{x^3}}=1$
$\lim_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{x^3}=1$
$\lim_{x\to 0}\frac{1+a\cos x-b\frac{\sin x}{x}}{x^2}=1$
$\lim_{x\to 0}\frac{1+a\cos x-b}{x^2}=1$
As denominator is tending to zero,so numerato will also tend to zero.
$1+a-b=0............................(1)$
Applying L Hospital rule,
$\lim_{x\to 0}\frac{-a\sin x}{2x}=1$
So $a=-2$ and $b=-1$
But the answer given in my book is $a=\frac{-5}{2}$ and $b=-\frac{3}{2}$.
I do not understand where have i gone wrong?

Others have pointed to your mistake.
The numerator in your third line can be written as
$$x\bigl(1+a(1-{x^2\over2}+?x^4)\bigr)-b\bigl(x-{x^3\over6}+?x^5\bigr)=(1+a-b)x+\bigl(-{a\over2}+{b\over6}\bigr)x^3+?x^5\ ,$$
where each question mark represents some convergent power series. It follows that $a$ and $b$ have to satisfy
$$1-a-b==0,\qquad-{a\over2}+{b\over6}=1\ ,$$
from which we obtain
$$a=-{5\over2},\qquad b=-{3\over2}\ .$$
