\documentclass{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{graphicx}


\begin{document}

A square and a circle are placed so
that the circle is outside the square and tangent to a side of the
square.  The sum of the length of one side of the square and the
circle's diameter is 12 feet, as shown.  Suppose the length of one
side of the square is $x$ feet.
\begin{enumerate}
\item Write a formula for $f(x)$, the {sum} of the total area
of the square and the circle. What is the domain of
this function when used to describe this problem? (The domain should
be related to the problem statement.) Sketch a graph of $f(x)$
on its domain.

\item Suppose that the object (square or circle) with {larger}
area is painted red, and the object (square or circle) with {smaller}
area is painted green. The cost of red paint to cover 1 square foot is
\$4, and the cost of green paint to cover 1 square foot is \$10. Let
$g(x)$ be the function which gives the cost of painting the squares.
Describe the function $g(x)$. Sketch a graph of $g(x)$ on its domain.

\noindent {\bf Hint} Read the question {\it carefully}. The answer
will be a piecewise-defined function.  A complete answer should give
all relevant information

\item Where is the function $g(x)$ continuous? Where is it
differentiable? Which value of $x$ gives the least cost?

\begin{center}
    \includegraphics[width=0.5\textwidth]{w3A.png}
\end{center}

\end{enumerate}

\end{document}