You can do this more simply by defining a personal command. This is the simplest way:
\newcommand{\problem}{%
\refstepcounter{section}%
\section*{Problem \thesection}}
Here's a skeleton document:
\documentclass{article}
\usepackage{amsmath}
\newcommand{\problem}{%
\refstepcounter{section}%
\section*{Problem \thesection}}
\numberwithin{equation}{section}
\begin{document}
\problem\label{easy}
Compute the following expression:
\begin{equation}\label{compute}
1+1
\end{equation}
\problem\label{difficult}
Using the result obtained from~\eqref{compute} in Problem~\ref{easy},
express
\begin{equation}
\int_{0}^{x} e^{-t^2}\,dt
\end{equation}
in terms of elementary functions.
\end{document}
There are many possible refinements. For example, you seem to want to have sequences of problems. Here's an attempt at it:
\documentclass{article}
\usepackage{amsmath,xparse}
\NewDocumentCommand{\problem}{ s }
{%
\IfBooleanTF{#1}
{\refstepcounter{subproblem}%
\section*{Problem \thesubproblem}}%
{\refstepcounter{section}%
\section*{Problem \thesection}}%
}
\newcounter{subproblem}[section]
\renewcommand{\thesubproblem}{\thesection\alph{subproblem}}
\numberwithin{equation}{section}
\begin{document}
\problem\label{easy}
Compute the following expression:
\begin{equation}\label{compute-easy}
1+1
\end{equation}
\problem*\label{less-easy}
Compute the following expression:
\begin{equation}\label{compute-less-easy}
1-1
\end{equation}
\problem\label{difficult}
Using the result obtained in~\eqref{compute-easy} and
Problem~\ref{less-easy}, express
\begin{equation}
\int_{0}^{x} e^{-t^2}\,dt
\end{equation}
in terms of elementary functions.
\end{document}
A “main problem” is started with \problem
, while a “subproblem” is started with \problem*
. The equation number will still be the one established by the main problem.
Avoiding the explicit number in the command allows for easily change the order of the problem, by just shuffling around their texts.
<number>
only?