\[\cos\frac{\pi}{8}\cos\frac{\pi}{24} - \sin\frac{5\pi}{24}\sin\frac{\pi}{8} =\]
\[= \frac{\sqrt{3}}{4} + \frac{1}{2}\cos\frac{\pi}{12} - \frac{1}{2}\cos\frac{\pi}{12} + \frac{1}{4} =\]
\[= \frac{\sqrt{3}}{4} + \frac{1}{4} = \frac{\sqrt{3} + 1}{4}\]