Correct answer is: (c) M / 2
The spring will exert the maximum force when the ball is at its lowest position. If the ball has descended through a distance x to reach this position, mgx = 1/2 Kx2, where k is the force constant of the spring. For the block B to leave contact, spring force = kx = Mg