The very first line "64/xy". What does that represent? A=xy -> 64=xy thus y=64/x like you said but this first line still makes no sense to me.

Your work has a big of a gap in it, but you end up correct that , where P' is of course 0.

It looks like you did a 2nd derivative test to determine if the critical values were maximums or minimums. I've always hated doing that test and here it's not necessary at all. With optimization problems, you are thinking of a real-life scenario and have limitations. You are right that x=(-8,8) y = (-8,8) are correct solutions to your equation, but since P is the perimeter of something, x and y can never be negative. We call these extraneous solutions and we just throw them out because they make no sense for the problem. So we are left with x=8, y=8 and that seems correct to me.