По теореме косинусов:
\[x^2=AB^2+AC^2-2\cdot AB\cdot AC\cos45^\circ\]
\[x^2=(\sqrt8)^2+5^2-2\cdot\sqrt8\cdot5\cdot\frac{\sqrt2}{2}=8+25-20=13.\]
Ответ: \(x=\sqrt{13}\) дм.