Final answer:
The problem requires application of momentum conservation and spring mechanics to find the speed of the second block and the spring compression, but cannot be solved without additional information or assumptions.
Step-by-step explanation:
The question involves a collision of two blocks connected by a massless spring and applies concepts from conservation of momentum, conservation of energy, and spring mechanics to solve for the speed of the second block and the compression of the spring during the collision.
To find the speed of the second block (m2) when the first block (m1) is moving to the right at 3 m/s, conservation of momentum can be used because there are no external forces on the system. For a spring with a spring constant (k), and given the speeds of the blocks, the conservation of momentum equation and Hooke's law (F = kx, where x is the compression of the spring) would allow us to calculate the missing values. Unfortunately, since this requires information not provided in the question (specifically, the initial compression of the spring), it is not possible to provide a solution with the given data.
The distance the spring is compressed can be found using energy conservation principles and Hooke's law once all other necessary values are known. However, without further details or assumptions, it is not possible to calculate this with the information provided in the question.