$\begin{align}
\lim_{x \to 0} \frac{x\cos(x)-\sin(x)}{x^2}\sim\\
\sim\lim_{x \to 0} \frac{\sin(x)\cos(x)-\sin(x)}{x^2}=\\
=\lim_{x \to 0} \sin(x)\frac{\cos(x)-1}{x^2}=\\
=\lim_{x \to 0} \sin(x)\frac{-2\sin^2(\frac{x}{2})}{x^2}=\\
=\lim_{x \to 0} \sin(x) \cdot\left(-\frac{1}{2}\right)\frac{\sin^2(\frac{x}{2})}{\frac{x}{2}^2}=\\
=\lim_{x \to 0} -\frac{1}{2}\sin(x)=\\
=0
\end{align}$
Note:
You can easily avoid half of the computation assuming as already proved the trig limit $\lim_{x \to 0}\frac{\cos(x)-1}{x^2}=-\frac{1}{2}$
The asymptotic is justified since $\sin(x)=x+o(x^2)$
To proove it, consider:
$\cos(x)<\frac{\sin(x)}{x}<1$
Thus, multiplying all for $x$ and then subtracting $x$ and dividing for $x^2$, we get:
$\frac{x\cos(x)-x}{x^2}<\frac{\sin(x)-x}{x^2}<0$
Thus, as we have showned before, the left term goes to $0$, and using the squeeze theorem, we have shown the statement