A block A of mass M rests on a wedge B of mass 2M and inclination . There is sufficient friction between A and B, so that A does not slip on B. If there is no friction between B and ground, the compression in spring is
On M, horizontal components of N and f are balanced (as Mg is vertical). Hence, on 2M also, they will be balanced.
Horizontal force kx on 2M should be zero.