A block of mass m1 = 22.0 kg is connected to a block of mass m2 = 40.0 kg by a massless string that passes over a light, frictionless pulley. The 40.0-kg block is connected to a spring that has negligible mass and a force constant of k = 260 N/m as shown in the figure below. The spring is unstretched when the system is as shown in the figure, and the incline is frictionless. The 22.0-kg block is pulled a distance h = 18.0 cm down the incline of angle θ = 40.0° and released from rest. Find the speed of each block when the spring is again unstretched.

I know that the two speeds are equal to each other. I used Ko+Up=Kf+Uf to get this equation: (2(40*9.8*.18+1/2(.18)^2*260-22*9.8*.18*sin40))/62 to get 1.48. This wasn't right. Help!