You are a jeweler who sells necklaces and rings. Each necklace takes 4 ounces of gold and 2 diamonds to produce, each ring takes 1 ounce of gold and 3 diamonds to produce. You have 80 ounces of gold and 90 diamonds. You make a profit of 60 dollars per necklace you sell and 30 dollars per ring you sell, and want to figure out how many necklaces and rings to produce to maximize your profits.

Clearly this is a maximization problem, and this is how I formulated it.

Let $n$, $r$, $g$, and $d$ represent units of necklaces, rings, gold, and diamonds, respectively.

Then, $n=4g+2d$, and $r=g+3d$.

Our profit can be defined by $p=60n+30r$.

Our constraints are $g\le 80$, and $d\le 90$.

I tried to approach solving this by substituting n and r for their production functions in the profit function. But, on second thought, I'm not sure if plugging them in maintains an equivalent profit function, because the gold/diamond amounts are tied together for each necklace/ring made.

So, I'm not sure if $p=60n+30r$ and $p=60(4g+2d)+30(g+3d)$ are equivalent statements.

Am I approaching this problem correctly? If not, how should I think about the problem? Thank you.

Clearly this is a maximization problem, and this is how I formulated it.

Let $n$, $r$, $g$, and $d$ represent units of necklaces, rings, gold, and diamonds, respectively.

Then, $n=4g+2d$, and $r=g+3d$.

Our profit can be defined by $p=60n+30r$.

Our constraints are $g\le 80$, and $d\le 90$.

I tried to approach solving this by substituting n and r for their production functions in the profit function. But, on second thought, I'm not sure if plugging them in maintains an equivalent profit function, because the gold/diamond amounts are tied together for each necklace/ring made.

So, I'm not sure if $p=60n+30r$ and $p=60(4g+2d)+30(g+3d)$ are equivalent statements.

Am I approaching this problem correctly? If not, how should I think about the problem? Thank you.