This was the problem. And they solved it by doing this:
I don't understand what they they did. Can someone help me understand it?
This is some version of the "l'Hospital" rule. Or some truncated version of Taylor expansion. I don't like it.
What you can do is this : using Taylor expansion for function $f$ at point $x$, you have : $$f(y)=f(x)+(y-x)f'(x) + o(y-x)$$ So, putting $x=2$ and $y=2+2h+h^2$ : $$f(2h+2+h^2) = f(2) + (2h+h^2)f'(2)+o(h) = f(2)+h((2+h)f'(2)+o(1))$$ and with $x=1$ and $y=1+h-h^2$ : $$f(1+h-h^2)=f(1)+(h-h^2)f'(1)+o(h) = f(1)+h((1-h)f'(1)+o(1))$$ so $$\frac{f(2h+2+h^2)-f(2)}{f(1+h-h^2)-f(1)} = \frac{h((2+h)f'(2)+o(1))}{h((1-h)f'(1)+o(1))} = \frac{(2+h)f'(2)+o(1)}{(1-h)f'(1)+o(1)}$$ If, and ONLY IF, $f'(1)\ne0$, then this fraction has limit $\frac{2f'(2)}{f'(1)}$.
The solution provided is not false, but the first equality needs a lot of justifications, so I don't like it. But maybe there's a theorem used in american teaching (l'Hospital ?) that we don't use in France, that could justify the solution.
The given solution is not correct - although its final result is right - because we do not know whether $f'$ exists around $2$ and $1$, resp.
So, we should only use the existence of the two given derivatives and this is possible:
We know
$$\lim_{t\to 0}\frac{f(2+t)-f(2)}{t}=f'(2)=6 \text{ and } \lim_{t\to 0}\frac{f(1+t)-f(1)}{t}=f'(1)=4$$
Hence, only using this, rewrite \begin{eqnarray*}\frac{f(2+2h+h^2)-f(2)}{f(1+h-h^2)-f(1)} & = & \frac{f(2+2h+h^2)-f(2)}{2h+h^2}\cdot\frac{h-h^2}{f(1+h-h^2)-f(1)}\cdot\frac{2h+h^2}{h-h^2}\\ & \stackrel{h\to 0}{\longrightarrow} & f'(2)\cdot \frac 1{f'(1)}\cdot 2 = 3 \end{eqnarray*}