1/2 kx2 = 1/2 mv2
1/2×100×x2 = 1/2×16×(4)2
50×x2 = 256/2
x2 = 128/50
x2 = 2.56
x = 1.6
so, the spring is compressed 1.6 m .