This is a variation on the theme of Example 2 from Ch.3 in B. Gelbaum and J. Olmsted, Counterexamples in Analysis (https://rads.stackoverflow.com/amzn/click/com/0486428753), where a differentiable function having the discontinuous derivative is constructed.

First, you should to redefine the function at $x=1$ by

```
f[x_] := Piecewise[{{-(x - 1)^2 + (x - 1)^3 Sin[1/(x - 1)^2],
x != 1}, {0, x == 1}}]
```

Second, you need not two gains $h$ and $k$ to find the second derivative at $x=1$, only $h$ is enough (see Wiki (https://en.wikipedia.org/wiki/Finite_difference))

```
Limit[(f[1 + h] - 2*f[1] + f[1 - h])/h^2, h -> 0]
(*-2*)
```

The second derivative is discontinuous at $x=1$ as

```
Plot[f''[x], {x, 0, 2}]
```

shows.

Addition. Unfortunately, nobody notices an inaccuracy in my answer so I must indicate it on my own. The limit

```
Limit[(f[1 + h] - 2*f[1] + f[1 - h])/h^2, h -> 0]
```

equals `f''[1]`

only if that second derivative exists. However, in the case under consideration the derivative `f'[x]`

is discontinuous at `x==1`

as the results of

```
MaxLimit[f'[x], x -> 1]
(*2*)
```

and

```
MinLimit[f'[x], x -> 1]
(*-2*)
```

prove. Therefore, `f'[x]`

does not have the derivative at `x==1`

, being discontinuous at that point.