For
$$x\ne0$$
given function is
$$f(x)=x^p\sin\left(\frac1x\right)$$
Differentiate using product rule.
We know,
$$\frac d{dx}\left(\sin\frac1x\right)=\cos\left(\frac1x\right)\left(-\frac1{x^2}\right)$$
Therefore,
$$f'(x)=\frac d{dx}\left(x^p\right)\sin\left(\frac1x\right)+x^p\frac d{dx}{\left(\sin\frac1x\right)}$$
$$=px^{p-1}\sin\left(\frac1x\right)-x^{p-2}\cos\left(\frac1x\right)$$
Now differentiate again.
Differentiate first term :
$$\frac d{dx}\left[px^{p-1}\sin\left(\frac1x\right)\right]$$
Using product rule,
$$=p(p-1)x^{p-2}\sin\left(\frac1x\right)+px^{p-1}\cos\left(\frac1x\right)\left(-\frac1{x^2}\right)$$
$$=p(p-1)x^{p-2}\sin\left(\frac1x\right)-px^{p-3}\cos\left(\frac1x\right)$$
Now differentiate second term :
$$\frac d{dx}\left[-x^{p-2}\cos\left(\frac1x\right)\right]$$
Again using product rule,
$$=-(p-2)x^{p-3}\cos\left(\frac1x\right)-x^{p-2}\left[-\sin\left(\frac1x\right)\left(-\frac1{x^2}\right)\right]$$
$$=-(p-2)x^{p-3}\cos\left(\frac1x\right)-x^{p-4}\sin\left(\frac1x\right)$$
Now combine both parts.
$$f''(x)=p(p-1)x^{p-2}\sin\left(\frac1x\right)-px^{p-3}\cos\left(\frac1x\right)$$
$$-(p-2)x^{p-3}\cos\left(\frac1x\right)-x^{p-4}\sin\left(\frac1x\right)$$
Group similar terms :
$$f''(x)=\left[p(p-1)x^{p-2}-x^{p-4}\right]\sin\left(\frac1x\right)$$
$$-(2p-2)x^{p-3}\cos\left(\frac1x\right)$$
Now check existence of $$f''(0)$$.
First,
$$f'(0)=\lim_{h\to0}\frac{f(h)-f(0)}{h}$$
$$=\lim_{h\to0}h^{p-1}\sin\left(\frac1h\right)$$
Since $$\sin\left(\frac1h\right)$$ is bounded,
$$f'(0)=0 \qquad \text{for } p>1$$
Now,
$$f''(0)=\lim_{h\to0}\frac{f'(h)-f'(0)}{h}$$
Since $$f'(0)=0$$,
$$f''(0)=\lim_{h\to0}\left[p\,h^{p-2}\sin\left(\frac1h\right)-h^{p-3}\cos\left(\frac1h\right)\right]$$
For this limit to exist, both terms must approach zero.
Therefore,
$$p-2>0,\qquad p-3>0$$
which gives
$$p>3$$
and hence
$$f''(0)=0$$
Now for continuity of $$f''(x)$$ at $$x=0$$
we need
$$\lim_{x\to0}f''(x)=f''(0)$$
Since $$\sin\left(\frac1x\right)$$ and $$\cos\left(\frac1x\right)$$ are bounded between $$-1$$ and $$1$$,
the powers of $$x$$ must force every term to go to zero.
The powers present are
$$p-2,\quad p-3,\quad p-4$$
The smallest power is
$$p-4$$
For the limit to exist and equal zero,
$$p-4>0$$
$$p>4$$
Therefore,
$$\lim_{x\to0}f''(x)=0=f''(0)$$
Hence,
$$f''(x)$$
is continuous at
$$x=0$$
when
$$\boxed{p>4}$$