Step 1 :Let first shelf length be x cm.
Step 2 :Second shelf length = 18 + 2x cm.
Step 3 :Third shelf length = x - 12 cm.
Step 4 :Fourth shelf length = x + 4 cm.
Step 5 :x + (18 + 2x) + (x - 12) + (x + 4) = 250
Step 6 :5x + 10 = 250
Step 7 :5x = 240
Step 8 :x = 48
Step 9 :Second shelf length = 18 + 2(48) = 114 cm.