Use $\displaystyle cos(t+ \pi/4)= cos(t)cos(\pi/4)- sin(t)sin(\pi/4)$$\displaystyle = (\sqrt{2}/2)cos(t)- (\sqrt{2}/2)sin(t)$ so $\displaystyle cos^2(t+ \pi/4)= \frac{1}{2}cos^2(t)- sin(t)cos(t)+ \frac{1}{2}sin^2(t)$
$\displaystyle \frac{cos^2(t+ \pi/4)- \frac{1}{2}}{t}= \frac{1}{2}\frac{cos^2(t)-1}{t}- \frac{sin(t)}{t}cos(t)+ \frac{1}{2}\frac{sin(t)}{t}sin(t)$$\displaystyle = -\frac{1}{2}\frac{sin(t)}{t}sin(t)- \frac{sin(t)}{t}cos(t)+\frac{1}{2}\frac{sin(t)}{t} sin(t)$$\displaystyle = -\frac{sin(t)}{t}cos(t)$