Step 1:
LHL =$\lim\limits_{\large x\to \pi}(x^2-\sin x+5)$
Put $x=\pi-h$
$\Rightarrow \lim\limits_{\large h\to 0}[(\pi-h)^2-\sin(\pi-h)+5]$
$\Rightarrow \lim\limits_{\large h\to 0}\pi^2-2\pi h+h^2-\sin h+5]$
$\Rightarrow \pi^2+5$
Step 2:
RHL=$\lim\limits_{\large x\to \pi^+}(x^2-\sin x+5)$
Put $x=\pi+h$
$\Rightarrow \lim\limits_{\large h\to 0}[(\pi+h)^2-\sin(\pi+h)+5]$
$\Rightarrow \lim\limits_{\large h\to 0}\pi^2+2\pi h+h^2+\sin h+5]$
$\Rightarrow \pi^2+5$
$f(\pi)=\pi^2+5$
LHL=RHL=$f(\pi)$
Hence $f$ is continuous at $x=\pi$
Step 3:
Alternatively $g(x)=x^2+5$ is a polynomial and $h(x)=\sin x$
Therefore $g$ is continuous for all $x\in R$
$f=g-h$ is also continuous for $x\in R$