There is something wrong in it I think.
For this problem:
"A 20.0-kg block is connected to a 30.0-kg block by a string that passes over a light frictionless pulley. The 30.0-kg block is connected to a spring that has negligible mass and a force constant of 250 N/m, as shown. The spring is unstretched when the system is as shown in the figure, and the incline is frictionless. The 20.0-kg block is pulled 20.0 cm down the incline (so that the 30.0-kg block is 40.0 cm above the floor) and released from rest.
Find the speed of each block when the 30.0-kg block is 20.0 cm above the floor (that is, when the spring is unstretched)."
I think that the part in bold is wrong. The 30 kg mass is heavier than the 20 kg mass, so the pulley will spin clockwise, thereby compressing the spring and giving it a new equilibrium point. Would this change the answer to the problem? The initial and final states will differ because of the spring being stretched.