the answer is 57
and logic is -
Let the smaller triangle have side lengths a, b, c with a < b < c, and the larger triangle have side lengths b, c, d with b < c < d.
a, b, c, d form a geometric progression, and (a +b) > c. So the ratio is less than 1.618. Since all the sides are integral, a = f^3, b = f^3r (where r is the ratio), c = f^3r^2, and d = f^3r^3.
Since d < 50, d is an integer cube > 2, d must be 27. The ratio r therefore must b 1.5 so that a = 8: b = 12, c = 18.
12 + 18 + 27 = 57