\documentclass[12pt]{article}
\usepackage[width=16cm,height=22cm]{geometry}
\usepackage[intlimits]{amsmath}
\usepackage{amsfonts,amssymb,amsthm,mathtools}
\usepackage{ifthen}

\theoremstyle{definition}
\newtheorem{exercise}{Exercise}
\newtheorem{defn}{Definition}
\newtheorem{note}{Note}
\newtheorem*{objectives}{Objectives}
\newtheorem*{requirements}{Requirements}

\newcommand{\eqdef}{\coloneqq}
\newcommand{\RealNumbers}{\mathbb{R}}
\newcommand{\PositiveRealNumbers}{\mathbb{R}_+}
\newcommand{\ComplexNumbers}{\mathbb{C}}
\newcommand{\eps}{\varepsilon}
\newcommand{\hsp}[1]{\mbox{}\vphantom{0_0^0}\hspace{#1}\mbox{}}
\newcommand{\ubrace}[1]{\underbrace{\mbox{}\vphantom{0_0^0}\hspace{#1}\mbox{}}_?}
\newcommand{\vertstrut}{{\displaystyle\vphantom{\int}}}
\newcommand{\bigvertstrut}{{\displaystyle\vphantom{\int_0^1}}}

\makeatletter
\newcommand{\mytitle}[2][empty]{
\newcommand{\titlename}{#2}
\newcommand{\shorttitlename}{\ifthenelse{\equal{#1}{empty}}{#2}{#1}}
\renewcommand{\@oddfoot}{\hfill{}\shorttitlename{},\quad{}page~{\thepage}~of~\pageref{endlabel}\hfill}
\begin{center}\bfseries\LARGE\titlename\end{center}\par\medskip}
\makeatother

\begin{document}

\mytitle{General Leibniz rule}

\bigskip\noindent
This text is just a stub.

\begin{objectives}
Recall the general Leibniz rule for the $n$th derivative of the product of two functions.
\end{objectives}

\begin{requirements}
Derivative of the product of two functions, Binomial Theorem.
\end{requirements}

\bigskip

\begin{exercise}
Expand:
\par
\begin{align*}
(a+b)^2 &= \hsp{20em}
\\[3ex]
(a+b)^3 &= \hsp{20em}
\end{align*}
\end{exercise}

\bigskip

\begin{exercise}
Recall the Binomial Theorem:
\par\bigskip
\[
(a+b)^n = \sum_{k=0}^n \ubrace{8em}
\]
\end{exercise}

\bigskip

\begin{exercise}
Calculate derivatives:
\par
\begin{align*}
(fg)' &= \hsp{20em}
\\[3ex]
(fg)'' &= \hsp{20em}
\\[3ex]
(fg)''' &= \hsp{20em}
\end{align*}
\end{exercise}

\bigskip

\begin{exercise}
Write the general formula (\emph{general Leibniz rule}):
\par\bigskip
\[
(fg)^{(n)}=\hsp{20em}
\]
\end{exercise}

\label{endlabel}
\end{document}
