Having insane amounts of trouble doing this. Here's a graph of $f(x)$:

How am I to calculate $\lim_{x \to 0} f(f(x))$ , $\lim_{x \to 3} f(f(x))$ , $\lim_{x \to 0} f(1+x^2)$. One that is even more confusing for me is $\lim_{x \to 0} f((1+x)^2)$. Is there some law I'm missing that is preventing me from calculating these limits? I can't seem to grab the intuition or any idea whatsoever of how to get about solving these.
As for the first limit, note that for $|x| < 1 , f(f(x)) = f(1) = -2$. So the first limit is $$\lim_{x \to 0} f(f(x)) = -2$$
The second limit does not exist, since (sufficiently near to $3$) for $x>3$ you have $f (f(x)) = 1$ while for $x<3$ you have $f(f(x)) > \frac{3}{2}$.
The third limit is just $$\lim_{x \to 0} f(1+x^2) = \lim_{h \to 1^+} f(h) = 2$$