$\require{begingroup}\begingroup
\newcommand{\degs}{^\circ}
\newcommand{\cut}{\setminus}
\newcommand{\AND}{\ \ {\rm{\small{AND}}}\ \ }
\newcommand{\OR}{\ \ {\rm{\small{OR}}}\ \ }
\newcommand{\NOT}{\ \ {\rm{\small{NOT}}}\ \ }
\newcommand{\Implies}{\Rightarrow}
\newcommand{\If}{\Leftarrow}
\newcommand{\Iff}{\Leftrightarrow}
\newcommand{\x}{\times}
\newcommand{\R}{\mathbb{R}} \newcommand{\C}{\mathbb{C}} \newcommand{\N}{\mathbb{N}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\Q}{\mathbb{Q}}
\newcommand{\E}{\operatorname{\rm{\small{E}}}}
\renewcommand{\Re}{\operatorname{Re}} \renewcommand{\Im}{\operatorname{Im}}
\newcommand{\dash}{\textrm{-}}
\newcommand{\der}{\partial}
\newcommand{\del}{\nabla}
\newcommand{\inv}{{\sim}}
\newcommand{\eps}{\varepsilon}
\newcommand{\indent}{\ \ \ \ \ \ } \newcommand{\dedent}{\!\!\!\!\!\!\!\!\!}$
I think it's actually okay that there are some unknowns.
The reason is there are many possible $g(x,y)$ functions that will solve this problem, i.e. that will satisfy the condition that the resulting vector field is conservative.
You correctly stated that
$$ \frac{\der M}{\der y} = \frac{\der N}{\der x} $$
which simplifies to
$$ 3 = g_x $$
Integrating both sides with respect to $x$ yields
$$ g(x,y) = 3x + h(y) $$
where $h(y)$ is an arbitrary function.
At this point you might be tempted to try to somehow solve for $h(y)$ (I was, anyway), but it turns out this $h(y)$ is not something to solve for, it rather describes the form of all the possible $g(x,y)$ solutions: i.e. that as long as $g(x,y)$ has the form
$$ g(x,y) = 3x + h(y) $$
for some function $h(y)$, then $g$ is a valid solution to the problem. If you don't believe me, try plugging in the above expression for $g(x,y)$ and solving for the potential function $f$ of the vector field $\vec{\mathbf{F}}$ in terms of $h(y)$. You'll see that it doesn't matter what $h(y)$ is, we can always find $f$.
$\endgroup$