When two springs are attached in series and compressed both the springs are not compressed by the same length. The compression depends on the spring constant of each of the springs.

For a combination of springs with spring constants k1 and k2 which are compressed by x, the individual compression is x1 and x2 with x1 + x2 = x. The relation between x1, x2, k1 and k2 is x1*k1 = x2*k2

Here, x = 2 m and the spring constants are k1 = 4 N/m and k2 = 6 N/m.

If the spring with spring constant 4 N/m is compressed by x1 m,

4*x1 = 6*(2 - x1)

=> 4*x1 = 12 - 6*x1

=> 10*x1 = 12

=> x1 = 1.2 m

x2 = 2 - 1.2 = 0.8 m

When the system of springs is compressed by 2m, the spring with a spring constant of 4 N/m is compressed by 1.2 m and that with a spring constant 6 N/m is compressed by 0.8 m.