Hello, Olivia!

You made a vailiant effort, but your set-up is off . . .

A 30-cm piece of wire is cut in two.

One piece is bent into the shape of a square.

The other piece is bent into the shape of a rectangle with a length-to-width ratio of 2:1.

The sum of the areas of the square and rectangle is a minimum.

What are the lengths of the two pieces? Let $\displaystyle x$ = length of wire for the rectangle.

Then $\displaystyle 30-x$ = length of wire for the square.

The rectangle looks like this: Code:

2k
* - - - - - - - *
| |
k | | k
| |
* - - - - - - - *
2k

The perimeter of the rectangle is: .$\displaystyle 2k + k + 2k + k \:=\:6k$

Its wire is $\displaystyle x$ cm long: .$\displaystyle 6k = x\quad\Rightarrow\quad k = \frac{x}{6}$ . **[1]**

The area of the rectangle is: .$\displaystyle A_r \:=\:(2k)(k) \:=\:2k^2$ . **[2]**

Substitute [1] into [2]: .$\displaystyle A_r \;=\;2\left(\frac{x}{6}\right)^2\quad\Rightarrow\q uad\boxed{A_r\:=\:\frac{x^2}{18}}$

The square looks like this: Code:

* - - - - - - *
| |
| |
| | ¼(30-x)
| |
| |
* - - - - - - *
¼(30-x)

The perimeter of the square is: $\displaystyle 30 - x$ cm,

. . so its side is: $\displaystyle \frac{1}{4}(30 - x)$

The area of the square is: .$\displaystyle A_s \;=\;\left(\frac{30-x}{4}\right)^2\quad\Rightarrow\quad\boxed{A_s\;=\; \frac{x^2 - 60x + 900}{16}}$

Hence, the total area is: .$\displaystyle A \;=\;\frac{x^2}{18} + \frac{x^2 - 60x + 900}{16} \;=\;\frac{1}{144}(17x^2 - 540x + 8100)$

And *that* is the function we must minimize . . .