Answer
See the explanation.
Work Step by Step
Verify that $y=0$ for $t=\pi$:
$y(\pi)=-\pi\cos (\pi )-\pi$
$y(\pi)=-\pi\cdot (-1)-\pi$
$y(\pi)=\pi-\pi$
$y(\pi)=0$ (True)
Find the derivative of $y$:
$\frac{dy}{dt}=\frac{d}{dt}(-t\cos t-t)$
$\frac{dy}{dt}=(-1\cdot \cos t+(-t)\cdot (-\sin t))-1$
$\frac{dy}{dt}=-\cos t+t\sin t-1$
Show that $y=-t\cos t -t$ satisfies the differential equation:
$t\frac{dy}{dt}=y+t^2\sin t$
$t\cdot (-\cos t+t\sin t-1)=y+t^2\sin t$ (Since $\frac{dy}{dt}=-\cos t+t\sin t-1$)
$-t\cos t+t^2\sin t-t=(-t\cos t-t)+t^2\sin t$ (Since $y=-t\cos t-t$)
$-t\cos t+t^2\sin t-t=-t\cos t+t^2\sin t-t$
$\therefore$ The left-hand side = The right-hand side