Well, I can get you started, but you will have to work out the algebra. Arbitrarily define and . Using Pythagoras, . Then using the Law of Cosines, you can find as a function of . Plug this back in to your perimeter and reduce. (Hint: consider when , the triangle is exactly , what is the perimeter of then?)