A block of mass m is released from rest at point A. The compression in spring when the speed of block is maximum.