Given that the length of the line segment is 36 cm and the distance between the midpoints of the first and the fourth parts is 30 cm, this means that the sum of the lengths of the first and the last part is
2(36 - 30) = 2(6) = 12 cm.
Thus, the sum of the length of the second and the third part is 36 - 12 = 24 cm.
Therefore, the distance between the midpoints of the second and the third parts is 24 / 2 = 12 cm.