I'm not sure what your initial equations were or what you were doing with them...?

Try starting with the "area" and "perimeter" formulas for a rectangle with height "h" and width "w".

. . . . .

. . . . .

Solving the "area" formula for one of the dimensions (keeping in mind that the area, in this case, is a constant value), you get:

. . . . .

Subsitituting, you get:

. . . . .

Differentiating, and keeping in mind that dA/dw = 0, you get:

. . . . .

Setting this equal to zero, you get:

. . . . .

. . . . .

. . . . .

. . . . .

(Since the width cannot be negative, you can ignore the negative square root.)

Since:

. . . . .

...and since the value you want is at w = sqrt[A], then:

. . . . .

...then:

. . . . .

What sort of rectangle has the same width as height?