\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}

\thispagestyle{empty}
\begin{document}
\[
h^2 = r^2 - \left(\dfrac{\pi r}{4}\right)^2 = r^2 - \dfrac{\pi^2 r^2}{16} = \dfrac{16r^2 - \pi^2 r^2}{16}
\]
\end{document}
