∵点C分线段AB为2:4
∴AC=AB×2/(2+4)=2AB/6
∵点D分线段AB为5:1
∴AD=AB×5/(5+1)=5AB/6
∴CD=AD-AC=5AB/6-2AB/6=AB/2
∴AB/2=15
∴AB=30(cm)