First of all, the poles you are thinking of are at $s=-n^2 \pi^2$. ($s=0$ is a removable pole of the sinh terms.)
Also note that, even though there are square roots in the sinh terms, we need not worry about taking branches because any odd phase behavior will cancel in the fraction. Therefore, what we have is a straightforward Bromwich contour encircling the poles.
The residue from the pole at $s_n=-n^2 \pi^2$ is simply
$$\frac1{s_n^2} \frac{\sinh{x \sqrt{s_n}}}{\cosh{\sqrt{s_n}}} 2 \sqrt{s_n} e^{s_n t} = \frac{2 (-1)^{n+1}}{n^3 \pi^3} e^{-n^2 \pi^2 t} \sin{n \pi x}$$
The residue at $s=0$ is a little trickier but still straightforward; it is equal to
$$\begin{align}\left [\frac{d}{ds} \frac{\sinh{x \sqrt{s}}}{\sinh{\sqrt{s}}} e^{s t} \right ]_{s=0} &= \left [\frac{d}{ds} \frac{\sinh{x \sqrt{s}}}{\sinh{\sqrt{s}}} \right ]_{s=0} + t \left [ \frac{\sinh{x \sqrt{s}}}{\sinh{\sqrt{s}}} \right ]_{s=0}\\ &= \lim_{s\to0} \frac{x \sinh{\sqrt{s}} \cosh{x\sqrt{s}}-\sinh{x \sqrt{s}} \cosh{\sqrt{s}}}{2 \sqrt{s} \sinh^2{\sqrt{s}}} + t x \\ &= \lim_{s\to0} \frac{\frac{x}{2} \left (1+\frac{s}{6} \right ) \left (1+\frac{x^2 s}{2} \right )-\frac{x}{2} \left (1+\frac{x^2 s}{6} \right ) \left (1+\frac{s}{2} \right )}{s}+ t x \\ &= \frac16 (x^3-x) + x t \end{align}$$
The sought-after result follows.