fix the document 
\documentclass[12pt]{article}
\usepackage{mathtools}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{enumerate}
\usepackage{graphicx}
\usepackage{mdframed}
\usepackage{multicol}
\usepackage{verbatim}
\usepackage{tikz}
\usepackage[margin = .8in]{geometry}
\geometry{letterpaper}
\linespread{1.2}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand\set[1]{\left\lbrace #1 \right\rbrace}
\newcommand\abs[1]{\left| #1 \right|}
\newcommand\parens[1]{\left( #1 \right)}
\newcommand\brac[1]{\left[ #1 \right]}
\newcommand\sol[1]{\begin{mdframed}
\emph{Solution.} #1
\end{mdframed}}
\newcommand\solproof[1]{\begin{mdframed}
\begin{proof} #1
\end{proof}
\end{mdframed}}

% Define a custom "definition" environment with mdframe for the union of sets
\newmdenv[
backgroundcolor=gray!10,
linewidth=0pt,
roundcorner=5pt,
font=\small,
frametitlefont=\bfseries,
frametitlebackgroundcolor=gray!30,
frametitlerule=true,
frametitle=Definition 1.1.3a - The union of sets,
]{uniondefbox}

% Define a custom "definition" environment with mdframe for the intersection of sets
\newmdenv[
backgroundcolor=gray!10,
linewidth=0pt,
roundcorner=5pt,
font=\small,
frametitlefont=\bfseries,
frametitlebackgroundcolor=gray!30,
frametitlerule=true,
frametitle=Definition 1.1.3b - The intersection of sets,
]{intdefbox}

% Define a custom "definition" environment with mdframe for the intersection of sets
\newmdenv[
backgroundcolor=gray!10,
linewidth=0pt,
roundcorner=5pt,
font=\small,
frametitlefont=\bfseries,
frametitlebackgroundcolor=gray!30,
frametitlerule=true,
frametitle=Definition 1.1.3c - The complement of sets
]{compdefbox}





\begin{document}
\begin{flushright}
\noindent Name: Geoffrey Pierson
\\ Date: Todays Date                                
\end{flushright}

\begin{center}
{\large Type the title of your work here!}
\end{center}

\noindent Total Questions: [Total] / Need for Review [xx] / Hard: [xx] / Medium: [xx]
\noindent Source: Chat GPT-3

\begin{enumerate}
\item Suppose $A=\{1,2,3\}$ and $B=\{2,3,4\}$. Find $A\cup B$.


\begin{uniondefbox}
The union of sets $A$ and $B$ is the set $A \cup B$, defined by
\begin{equation*}
A \cup B \coloneqq \{x : x \in A \text{ or } x \in B\}.
\end{equation*}
\end{uniondefbox}

\sol{We will choose to solve this rigorously using the definition (1.1.3) regarding the union of sets.

\solproof 
{Let $x \in A$ and $x \in B$. 
\\ Then by the definition of the union of sets (1.1.3) 
\\$A \cup B$ contains all elements in either $A$, or $B$, or both. 
\\ Therefore, $x \in A \cup B \implies x \in A$ or $x \in B$. \\
Substituting $A = \{1,2,3\}$ and $B = \{2,3,4\}$, \\
Thus we can conclude that $A\cup B = \{1,2,3,4\}$.}} 

\item Let $A = \{a, b, c\}$ and $B = \{c, d, e\}$. Find $A \cap B$

\begin{intdefbox}
The intersection of sets $A$ and $B$ is the set $A \cap B$, defined by
\begin{equation*}
A \cap B \coloneqq {x : x \in A \text{ and } x \in B}.
\end{equation*}
\end{intdefbox}

\sol{We will choose to solve this rigorously using definition (1.1.3) on the intersection of sets.
\solproof 
{Let $x \in A$ and $x \in B$. 
\\ Then by definition (1.1.3) on the intersection of sets \\
$A \cap B$ contains all elements in both $A$, and $B$. 
\\ Therefore, $x \in A \cap B \implies x \in A$ and $x \in B$. \\
Substituting $A = \{a,b,c\}$ and $B = \{c,d,e\}$, \\
Thus we can conclude that $A\cap B = \{c\}$.}}
\newpage
\item Suppose $A = \{1, 2, 3, 4, 5\}$ and $B = \{3, 4, 5, 6, 7\}$. Find $A^\complement$ and $B^\complement$.
\begin{compdefbox}
The complement of $B$ relative to $A$ is defined by,
\begin{equation*}
A\setminus B \coloneqq \{x : x \in A \text{ but } x \notin B\}.
\end{equation*}
\end{compdefbox}
\textbf{}
\sol{We will choose to solve this rigorously using definition (1.1.3) on the intersection of sets.
\solproof 
{Let $x \in A, B, \text{ and } \mathbb{U}$, where $\mathbb{U}$ is the universal set. 
\\ Then by definition (1.1.3c) on the complemenet of sets \\
$A \setminus \mathbb{U}$ contains all elements in $\mathbb{U} \cup A^\complement$. 
\\ Hence, if $x \notin A$, then $x \in A^\complement$ and x \in \mathbb{U}$.
\\ Substituting for $A = \{1,2,3,4,5\}$ we get,
\\ $A^\complement \implies \{x : x \in \mathbb{U}, x \in (-\infty, 1) \cup (5, \infty)\}$
\\ Using definition (1.1.3c) to describe B.
\\ It follows, that substituting for $B=\{3,4,5,6,7\}$
\\ Why is this line broken}} 
\end{enumerate}
\end{document}