With your values:
2. The length of the string consists of the circumferences of the cross-sections (I hope that this is meant by "the normal way" you mentioned). Two of the three cross-sections are equal due to the quadratic base area:
3. To minimize L differentiate L wrt x and solve L'(x) = 0 for x. You should come out with a cube.