A 24-cm segment is divided into two segments. One segment is three times as long as the other. Find the lenghts of both segments.

x + 3x = 24

solve.