Answer:
The minimum compression in the spring is

Step-by-step explanation:
From the question we are told that
The mass of the block is

The spring constant is

The coefficient of static friction is

The mathematical relationship between the wight of the block and the force exerted by the spring is

Where
is mathematical represented as
and
is mathematically represented as

Where d is minimum length of compression in the spring to prevent the block from slipping
Now the relation can be wrtten as

making d the subject we have

