$$f'(x)=\lim\limits_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
$$=$$
$$\lim\limits_{h\to 0}\frac{\frac1{x+h}-3\sin (x+h)-\frac1{x}+3\sin x}{h}$$
$$=$$
$$\lim\limits_{h\to 0}\frac{\frac1{x+h}-\frac1x-\left(3\sin(x+h)-3\sin x\right)}{h}$$
$$=$$
$$\lim\limits_{h\to 0}\frac{\frac1{x+h}-\frac1x}{h}+\lim\limits_{h\to 0}\frac{3\sin(x+h)-3\sin x}{h}$$
$$=$$
$$\lim\limits_{h\to 0}\frac{-1}{x(x+h)}+3\cdot\lim\limits_{h\to 0}\frac{\sin x\cdot\cosh+\cos x\cdot\sinh-\sin x}{h}$$
$$=$$
$$-\frac{1}{x^2}+3\cdot\lim\limits_{h\to 0}\frac{\sin x\cdot(\cos h-1)-\cos x\cdot\sinh}{h}$$
$$=$$
$$-\frac{1}{x^2}+3\cdot\sin x\cdot\lim\limits_{h\to 0}\frac{\cos h-1}{h}-3\cdot\cos x\cdot\lim\limits_{h\to 0}\frac{\sinh}{h}$$
$$=$$
$$-\frac{1}{x^2}-3\cdot\cos x$$