A pentagon is formed by placing an isosceles triangle on a rectange. If the pentagon has fixed perimeter P, find the lengths of the sides of the pentagon that maximize the area of the pentagon.

Check number 4 for a picture and answers:

http://ocw.nctu.edu.tw/upload/calcul.../ca2_test5.pdf
Its how to get the answers that i need help with...

Maximize the area:

Constraint:

using lagrange multipliers:

From here i cannot solve for any one variable. Caused mainly by the

, which adds one too many variables. I am most likely missing some little step to get me there, or mabye lagrange multipliers are not the best method to use...Please let me know what to do. Thanks!