Wow, Lagrange multipliers in high school!
As a rule with these Lagrange multiplier problems, when the problem is symmetrical with respect to interchange of the variables, the solution almost always ends up with all the variables equal -- what else could it be?
We want to maximize the area of a rectangle with sides x and y subject to the perimeter being constant.
(i)
The area of a rectangle is just the product of its sides:
A = f(x,y) = xy
(ii)
The perimeter of a rectangle is the sum of its sides:
P = g(x,y) = x + x + y + y = 2x+2y
(iii)
Usually I like to form the objective function E=f-λg before I take the derivatives. I usually use a lambda not a gamma for the multiplier.
Let's do what they ask. They want the gradient ∇f(x, y)



∇f(x, y) = (y, x)
(iv)



λ∇g(x, y) = (2λ, 2λ)
(v)
I'm not sure what γ=1/2y is about; I'll solve it like I know how and see where we are.


There it is. We get
y = 2λ

so we also find
x = 2λ
(vi)
We have y=x=2λ so we've shown the variables are equal, i.e. our rectangle is a square. We can solve for λ using our constraint:
P = 2x+2y = 8λ
λ=P/8
so as expected we have a square with side length P/4:
x=y=2λ=P/4