Step-by-step explanation:
Given that,
Mass of block = 3 kg
Spring constant k=500 N/m
Friction coefficient = 0.6
Speed = 5 m/s
(a). We need to calculate the maximum compression of the spring
Using work energy theorem

Put the value into the formula



Negative sign shows the compression.
The maximum compression of the spring is 0.354 m.
(b). We need to draw the bar diagram
We need to calculate the initial energy

Put the value into the formula


We need to calculate the final energy
Using formula of final energy



We need to calculate the work
Using formula of work


Put the value into the formula


Hence, This is the required solution.