A mass \( m \) is connected to a massless spring of spring constant \( k \), which is fixed to a wall. Another mass \( 2m \), having kinetic energy \( E \), collides collinearly with the mass \( m \) completely inelastically (see figure). The entire setup is placed on a frictionless floor. The maximum compression of the spring is: 

As shown below, bob A of a pendulum having a massless string of length \( R \) is released from 60° to the vertical. It hits another bob B of half the mass that is at rest on a frictionless table in the center. Assuming elastic collision, the magnitude of the velocity of bob A after the collision will be (take \( g \) as acceleration due to gravity):

