This is almost a comment, rather than an answer, but as the comments above were almost answers, it seems fair.
To given another example, which might make clear what is going wrong:
Suppose $$ f(x) = \cases{-1, & x<0,\\
0, & x=0,\\
1, & 0 <x.}$$
Now, except at $x=0$, $f'(x) =0$. (The graph of $f$ consists basically of two lines of slope $0$.)
Suppose that the question were to evaluate
$$I= \int_{-1}^1{d\over dx}f(x) \,dx.$$
The 'FTC method' would give $I= f(1) - f(-1) = 1- (-1) = 2$.
On the other hand, as $f'(x) = 0$ (except at $x=0$!), one should certainly get (geometrically, say, or Riemann sums) that
$$ \int_{-1}^1{d\over dx}f(x) \,dx \,= \int_{-1}^1 0\,dx = 0.$$
This is in fact the 'correct' answer.
This is analogous to the question you were given.
I think that one can object that the question used the expression, ${d\over dx} f(x)$, which is only defined 'almost everywhere.' In the framework of a calculus class and Riemann integration, $I$ should be treated as an improper integral - and the given answer [although 'correct'!] does not do so... If one treats the integral as an improper integral (i.e., break up the integral around $x=0$, and take limits), and use your 'FTC' method, one gets the correct answer.
Likewise, the given solution uses
$$\frac{d}{dx}(\tan^{-1}(\frac{1}{x})) = \frac{d}{dx}(\cot^{-1}(x)) = \frac{-1}{1+x^2}.$$
But that equality fails at $x=0$.
FWIW, there is a 'theory of integration' (Lebesgue) that handles 'almost everywhere,' and does not make a distinction between proper and improper integrals.
(At least not obviously)
– miraunpajaro Jul 01 '19 at 02:25