The perpendicular drawn from centre of the circle bisects the chord.
OO' bisects the chord AB into two equal parts of 15 cm each.
AC = CB = 15cm
Now applying Pythagoras Theorem in ΔOAC we get,
(25)2 = (15)2 + (X)2
625 = 225 + (X)2
X = 20 cm
Now Applying Pythagoras Theorem in ΔO'AC we get,
(17)2 = (15)2 + (Y)2
289 = 225 + (Y)2
Y = 8 cm
Therefore distance between the two centres is (X + Y) = (20 + 8) = 28 cm.