A 2M box is set on top of a 12M box. There is friction beween the masses. The 12M box is pushed against a spring. The spring is compressed a distance X by a 12 M mass. The 2M box does not slide from its position on top of the 12M mass. (the two masses are at rest in respect to each other) as the boxes slide forward when pushed by the spring.

a) What is the max acceleration the 12 M mass may incur without the 2M mass sliding w.r.t to the 12M mass ?
b) What is the max force constant of the spring that may be used without causing the 2M mass to slide off the 12M mass ?
Thanks in advance for your help.