The correct option is A mgk
When elevator is stationary spring is stretched to support block weight, if elongation is A then, mg=kA.
When cable breaks, the elevator starts falling with acceleration g and the elevator becomes an accelerated (non inertial) frame of reference. In that frame pseudoforce comes into play. This pseudoforce balances the weight and a net force kx acts on the system where the acceleration kxm is proportional and oppositely directed to the displacement.
Hence the motion is simple harmonic.
In initial case, the spring was stretched by A where velocity was zero. This elongation should give us the amplitude as well.
Hence, A=mgk