First we note the formula for the volume of a cylinder:
\(V=\pi r^2h\text{,}\) where
\(r\) is the radius and
\(h\) is the height. Since both cans have a height of
\(5\) inches, we substitute
\(h = 5\text{.}\) Since
\(r= \frac{d}{2}\text{,}\) the volume of the first can is then given by
\(\pi\cdot\left(\frac{d}{2}\right)^2\cdot 5\text{.}\) Using associativity and commutativity, this simplifies to
\begin{equation*}
\mbox{volume of smaller can} = \frac{5}{4}\pi d^2\ \mbox{in}^3.
\end{equation*}
Since the diameter of the larger can is three times that of the smaller can, its radius is
\(\frac{3d}{2}\text{,}\) which makes its volume
\begin{equation*}
\mbox{volume of larger can} = \pi\cdot\left(\frac{3d}{2}\right)^2\cdot 5 = \frac{45}{4} \pi d^2\ \mbox{in}^3.
\end{equation*}
Adding them together we have
\begin{equation*}
\mbox{Total Volume} = \frac{5}{4}\pi d^2 + \frac{45}{4}\pi d^2 = \frac{25}{2}\pi d^2\ \mbox{in}^3.
\end{equation*}