if $f^{(n)}(x_0),g^{(n)}(x_0)$ exist and $\lim_{x\to x_0} \dfrac{f(x)-g(x)}{(x-x_0)^n}=0$ then $f^{(r)}(x_0)=g^{(r)}(x_0 )$ for all $0\leq r\leq n.$ 
Show:
  if $f^{(n)}(x_0),g^{(n)}(x_0)$ exist and
  $$\lim_{x\to x_0} \dfrac{f(x)-g(x)}{(x-x_0)^n}=0$$
  then $f^{(r)}(x_0)=g^{(r)}(x_0 )$ for all $0\leq r\leq n.$

My attempt: 
let n = 1, 
since $f'(x_0),g'(x_0)$ exists then The taylor polynomial exists:
$$T_{f,1}(x)=f(x_0)+f'(x_0)(x-x_0), \lim_{x\to x_0} \dfrac{f(x)-T_{f,1}(x)}{(x-x_0)}=0$$
$$T_{g,1}(x)=g(x_0)+g'(x_0)(x-x_0), \lim_{x\to x_0} \dfrac{g(x)-T_{g,1}(x)}{(x-x_0)}=0$$
Then,
\begin{align}
\lim_{x\to x_0} \dfrac{f(x)-g(x)}{(x-x_0)^n} &
=\lim_{x\to x_0} \dfrac{f(x)-g(x)+T_{f,1}(x)-T_{f,1}(x)+T_{g,1}(x)-T_{g,1}(x)}{(x-x_0)^n}\\
&=\lim_{x\to x_0} \dfrac{f(x)-g(x)+T_{f,1}(x)-T_{f,1}(x)+T_{g,1}(x)-T_{g,1}(x)}{(x-x_0)^n}\\
&=\lim_{x\to x_0} \dfrac{f(x)-T_{f,1}(x)}{x-x_0}-\lim_{x\to x_0} \dfrac{g(x)-T_{g,1}(x)}{x-x_0}+\lim_{x\to x_0} \dfrac{T_{f,1}(x)-T_{g,1}(x)}{x-x_0}\\
&=\lim_{x\to x_0}\dfrac{T_{f,1}(x)-T_{g,1}(x)}{x-x_0}\\
&=0
\end{align}
Then,
\begin{align}
\lim_{x\to x_0}\dfrac{T_{f,1}(x)-T_{g,1}(x)}{x-x_0}
&=\lim_{x\to x_0}\dfrac{f(x_0)+f'(x_0)(x-x_0)-g(x_0)-g'(x_0)(x-x_0)}{x-x_0}\\
&=\left(f(x_0)-g(x_0)\right)\lim_{x\to x_0}\dfrac{1}{x-x_0}+f'(x_0)-g'(x_0)
\\&=0
\end{align}
I am confused because  $\lim_{x\to x_0}\dfrac{1}{x-x_0}$ does not exist.
 A: Hint Let
$$
\varepsilon_f(x) = \frac{f(x) - T_{f,n}(x)}{(x - x_0)^n}
\quad
\varepsilon_g(x) = \frac{g(x) - T_{g,n}(x)}{(x - x_0)^n}
$$
then
$$\lim_{x\to x_0} \varepsilon_f(x) = \lim_{x\to x_0} \varepsilon_g(x) =0$$
write
$$f(x) = T_{f, n}(x) + (x-x_0)^n \varepsilon_f(x)$$
and the same relation for $g$, then substitute in $\frac{f(x)-g(x)}{(x-x_0)^n}$
A: It's not restrictive to assume $x_0=0$.
Define $h(x)=f(x)-g(x)$ and consider its Taylor expansion around $0$:
$$
h(x)=h(0)+h'(0)x+\dots+h^{(n)}(0)\frac{x^n}{n!}+o(x^n)
$$
Then you have that
$$
\lim_{x\to0}\frac{h(x)}{x^n}=
\lim_{x\to0}\left(
\frac{h(0)}{x^n}+\frac{h'(0)}{x^{n-1}}+\dots+
\frac{h^{(n-1)}(0)}{(n-1)!\,x}+\frac{h^{(n)}(0)}{n!}+o(1)\right)
$$
exists (finite). If $k$ is the largest integer in the range $[0,n-1]$ such that $h^{(k)}(0)\ne0$, then the one sided limit from the right is $\pm\infty$ (depending on whether $h^{(k)}(0)$ is positive or negative), because “the highest degree denominator rules”. So no such integer exists.
Therefore $h(0)=h'(0)=\dots=h^{(n-1)}(0)=0$.
If you don't assume finiteness of your given limit, then the assertion is false. For instance,
$$
\lim_{x\to0}\frac{1+x^2}{x^4}=\infty
$$
but the second derivative of $h(x)=1+x^2$ at $0$ is $2$.
