The limit can be rewritten as
$$ \lim_{x \rightarrow 0} \frac{x-\sin x}{x^2} = \lim_{x \rightarrow 0} \frac{1}{x} \left[ 1- \frac{\sin x}{x} \right] $$
Recall the inequality,
$$ \cos x < \frac{\sin x}{x} < 1$$
holds for $ x\in (-\pi/2, \pi/2) $.
This provides the new inequalities
$$ 0 < \frac{1}{x} \left[ 1- \frac{\sin x}{x} \right] < \frac{1-\cos x}{x}, \text{ with } x>0 $$
$$ \frac{1-\cos x}{x} < \frac{1}{x} \left[1- \frac{\sin x}{x} \right]< 0, \text{ with } x<0 $$
Applying the Squeeze Theorem, we get
$$ \lim_{x \rightarrow 0^{\pm}} \frac{1}{x} \left[ 1- \frac{\sin x}{x} \right] = 0$$
Note:
$ \lim_{ x \rightarrow 0} \frac{1-\cos x}{x} = 0 $
Your proof is right. But I would have used Taylor developments :
$$\frac{x-\sin x}{x^2} \underset{x\rightarrow 0}{=} \frac{x-(x-x^3/6+o(x^3))}{x^2}\underset{x\rightarrow 0}{=}\frac{x}{6}+o(x)\underset{x\rightarrow 0}{\longrightarrow} 0$$