f(x) is a function such that $\lim_{x\to0} f(x)/x=1$ $f(x)$ is a function such that $$\lim_{x\to0} \frac{f(x)}{x}=1$$ if 
$$\lim_{x \to 0} \frac{x(1+a\cos(x))-b\sin(x)}{f(x)^3}=1$$
Find $a$ and $b$
Can I assume $f(x)$ to be $\sin(x)$ since $\sin$ satisfies the given condition?

Rewrite $$A=\frac{x(1+a\cos(x))-b\sin(x)}{f(x)^3}= \frac{x(1+a\cos(x))-b\sin(x)}{x^3}\times\Big(\frac{x}{f(x)}\Big)^3$$ and now, as Olivier Oloa answered, use Taylor expansions.
Whichever could be $\lim_{x\to0} \frac{f(x)}{x}=L$ (except $0$ or $\infty$), you could find the conditions you want for  $\lim_{x\to0} A=M$.
