\documentclass[11pt]{amsart}
\usepackage{fullpage}
\newcommand{\makeheading}[2]%
{\hspace*{-\marginparsep minus \marginparwidth}%
\begin{minipage}[t]{\textwidth}%
{\large \bfseries #1\hfill#2}\\[-0.15\baselineskip]%
\rule{\columnwidth}{1pt}%
\end{minipage}\bigskip
}
\theoremstyle{definition}
\newtheorem{prob}{Problem}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\makeheading{Math 6211 Autumn 2020, Homework 1}{Names}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{prob}
Here is the problem.
\end{prob}
\begin{proof}
Here is my solution.
\end{proof}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}