Well for one thing, since it's a right angle triangle, you know that $\displaystyle \begin{align*} c = \sqrt{a^2 + b^2} \end{align*}$, giving $\displaystyle \begin{align*} P = a + b + \sqrt{a^2 + b^2} \end{align*}$. Surely this must be easier to work with as it is now only in two variables...