Here's the MWE:
\documentclass{book}
\usepackage{amsfonts}
\usepackage{bm}
\usepackage{hyperref}
\begin{document}
\chapter{$\bm{a^2 + b^2 = c^2}$}
\end{document}
And here's the errors I get:
7: Illegal parameter number in definition of \Hy@tempa. \chapter{$\bm{a^2 + b^2 = c^2}$}
7: TeX capacity exceeded, sorry [input stack size=10000]. \chapter{$\bm{a^2 + b^2 = c^2}$}
Question: What's causing this, and how to get what I intend?