If I am reading your question right, we want
$$\lim_{x\to 0}x^2(1+\cot^2 3x).$$
How to approach? A reasonable thing to do is to express the cotangent in terms of the more familiar sines and cosines: $\cot t=\dfrac{\cos t}{\sin t}$. A little bit of algebra shows that we want
$$\lim_{x\to 0} \frac{x^2}{\sin^2 3x}(1+\cos^2 3x).$$
The $1+\cos^2 3x$ part is "safe," it approaches $2$.
To deal with the rest, express it as $\dfrac{1}{9}\left(\dfrac{3x}{\sin 3x}\right)^2$. Now you can take over.
In the second question, we want
$$\lim_{x\to\pi/4}\frac{1-\cos x}{x}.$$
This one requires almost no work. As $x$ approaches $\pi/4$, top and bottom behave perfectly nicely. The top approaches $1-\cos(\pi/4)$, since cosine is continuous. And of course the bottom approaches $\pi/4$. For a more explicit answer, recall that $\cos(\pi/4)=1/\sqrt{2}$. So the limit is equal to
$$\frac{1-\frac{1}{\sqrt{2}}}{\pi/4}.$$