Constructing segments from each end of the diameter to one of the points of the square off of the diameter will give a right triangle with s being the length of an altitude to the diameter. Now the altitude to the hypotenuse is of length s and the segments in the hypotenuse cut off by altitude have lengths a and s + a.