The reason why this doesn't work is simple: This way to derive the derivative only works at standard points. Observe what happens if you e.g. calculate $f'(\delta)$ for some infinitesimal $\delta$.
(Edited as per comment discussion)
Since you haven't given us your exact process, I'll fill in what I think it is, to show the exact problem.
First we define for any $x_0\in D\subseteq ℝ$, where $x_0$ is an accumulation point of $D$, for a function $f:D\toℝ$ its derivative in $x_0$ as $f'(x_0):=st(\frac{^*f(x)-f(x_0)}{x-x_0})$, if this value is identical for all $x\approx x_0\land x\neq x_0$.
This is a text-book definition, but only valid for $x\inℝ$. So we can talk about $f'(x_0)$, but not about $f'(x_0+\delta)$ for $\delta\approx 0\land \delta\neq 0$.
What I think you now did was just plug in this definition twice to arrive at $f''(x_0)$:
$$
f''(x_0)=st(\frac{\color{green}{^*f'(x)}-f'(x_0)}{x-x_0})\color{red}
=
st(\frac{^*\color{blue}{st(\frac{{^*f(x')}-{f(x)}}{x'-x})}-st(\frac{^*f(x'')-f(x_0)}{x''-x_0})}{x-x_0})
$$
You here end up with a wrong answer since at the green part, you're trying to use the definition on a non-standard-number. This then causes in the blue part both $x$ and $x'$ to be non-standard, so the $st$ smooths out more than you want it to.
Trying to compute $^*f'$ at non-standard points, as far as I know, either uses $\epsilon$-$\delta$-method over the hyperreals, or computes $f'$ as standard function and then uses the transfer method to deduce $^*f'$.
There are, however, ways to directly compute $f^{(n)}(x)$ for standard $x$. In the end you simply need to find the non-standard expression that is equivalent to the stack of limits that you get when iteratively substituting the definition of a derivative in $f^{(n)}(x)$.
This however is a bit of a hassle, so in many cases it's skipped over. For example you need to differentiate between iterated limits and simultaneous limits.