I am a bit confused why the "cross section" is the perimeter of the triangle. Cross section tends to refer to area. If I were doing the problem, my understanding of the constraints would have been:

If this is the case, then:

Now the system of equations looks much easier. Are you sure you really wanted the girth to be the perimeter?