-The original length of the spring was 1 m and the current length is 0.4m. So, the spring is compressed already by 0.6m. When a block of 4kg is kept on it, it gets compressed by another 0.1 m and the total compression becomes 0.7m.
Just before releasing, the block was at height 0.3m above the ground.
The velocity of the block before releasing and also at maximum height will be 0.
Hence, initial and final KE will be also 0
Using all the above data, we solve
Step 1)
Finding K of the spring
The block when placed on the platform, loses potential energy, which is stored in spring
$Mgh = 0.5 k (x_2^2 – x_1^2) \\ 4 \times 9.8 \times 0.1 = 0.5 \times k \times (0.7^2 – 0.6^2) \\ K= 60N/m $
Step 2)
Different works done on the block from A to B are by gravity and by spring. Gravity work will be negative because it will try to slow the block and the spring work will be positive because it launches the block.
Applying work energy principle,
$W_g + W_s = ∆KE \\ Mg(h_2-h_1) + 0.5 k (x_1^2 – x_2^2) = 0 \\ -4 \times 9.8 (H – 0.3) + 0.5 \times 60 (0.7^2- 0^2) = 0 $
(Assuming the ropes break and spring expands back to original length, where compression is 0)
$H = 0.675m$