Question: I don't know how to proceed in this question. What I know is that the perimeter is the sum of all the sides.

Answer: 
No, we don't.
Taylor's theorem states that 
$$f(x)=f(a)+\frac {f'(a)}{1!} (x-a)+ \frac{f''(a)}{2!} (x-a)^2+\ldots+\frac{f^{(n)}(a)}{n!}(x-a)^n+ R\_n(x)$$
where quite a few things can be said about $R\_n(x)$, for example
$$ \lim\_{x\to a}\frac{R\_n(x)}{(x-a)^n}=0$$
or
$$ \forall x\exists \xi\colon (a<\xi<x\lor x<\xi<a)\land R\_n(x)=\frac{f^{(n+1)}(\xi)}{(n+1)!}(x-a)^{n+1}$$

But we do not have in general that $\lim\_{n\to\infty}R\_n(x)=0$, hence not necessarily 
$$f(x)=f(a)+\frac {f'(a)}{1!} (x-a)+ \frac{f''(a)}{2!} (x-a)^2+\frac{f'''(a)}{3!}(x-a)^3+ \cdots $$
The way you state this is to imprecise to give a proof. The correct statement is that $$f(x) =\sum\_{k=0}^N \frac{f^{(k)}(0)}{k!}x^k +r\_N(x,\ldots)$$
Without the last term, the so called remainder (for which various different expressions are known, see [this page](https://en.wikipedia.org/wiki/Taylor's_theorem), the statement is not correct. The proof of the statement with remainder (usually by induction) is rather easy using the fundamental theorem of calculus or the mean value theorem.

**Edit** (the representation of $f$ by an infinite sequence of this kind is only true for so called real analytical functions)