Initially, mg = kx. K = mg/x = 700/0.5x10^-3 = 1400000N/m. From second condition, applying work-energy theorem, potential enery- elastic potential energy = change in kinetic energy. Now change in kinetic energy is 0 since initial and final velocities are 0m/s. Therefore, potential energy = elastic potential energy. mgh = (1/2) * k* x^2. x^2 = 2(mg)h/k = 2 x 700 x 1.3/ 1400000. x = 0.036m. Hope it's clear.