The perimeter of the trapezoid is the sum of the lengths of all 4 sides.
If we subtract from the perimeter the lengths of the two bases, we end up with the combined length of the two legs. Since the legs are congruent, we divide the combined length of the two legs by 2 to find the length of each leg.
perimeter - base - base = combined length of legs
57 mm - 6 mm - 15 mm = 36 mm = combined length of legs
36 mm / 2 = 18 mm = length of each leg
Answer: the length of each leg is 18 mm.