Using l'Hôpital directly is very awkward.
The denominator has $x^2$, but it is immediate that
$$
\lim_{t\to0}\frac{\sin3t-\sin t}{t}=3-1=2
$$
Consequently, also
$$
\lim_{x\to0}\frac{\sin(3x^2)-\sin(x^2)}{2x^2}=1
$$
Good! Now we can write our limit in the form
$$
\lim_{x\to0}\frac{\cos x-\cos 3x}{2x^2}\frac{2x^2}{\sin(3x^2)-\sin(x^2)}
$$
The first fraction can be easily dealt with:
$$
\lim_{x\to0}\frac{\cos x-\cos 3x}{2x^2}=
\lim_{x\to0}\frac{3\sin3x-\sin x}{4x}=
\lim_{x\to0}\frac{9\cos3x-\cos x}{4}=2
$$
For completeness, a much simpler strategy is using Taylor expansion:
$$
\frac{\cos x-\cos3x}{\sin(3x^2)-\sin(x^2)}=
\frac{1-x^2/2-1+(3x)^2/2+o(x^2)}{3x^2-x^2+o(x^2)}=
\frac{4+o(1)}{2+o(1)}
$$
so the limit is $2$.