Here is my previous post that I deleted to double check a few things. I've added a few comments to it. There's a certain part of this approach that's subtly tricky.
--------------------------------
I agree with
@Gaussian97 that Newton's second law
is the [might be a] better approach. (Although I
did use integral calculus.)
Newton's second law states that the sum of all forces on a given mass equals that mass times its acceleration.
[tex]\sum_i \vec F_i = m \vec a[/tex]
Set this up separately, one equation for [itex]m_1[/itex] and another for [itex]m_2[/itex]
A couple things to keep in mind:
- The magnitude of the spring force on a given mass isn't the total displacement of the mass times the spring constant (e.g. [itex]kx_1[/itex]), rather it is the total spring extension times the spring constant, [itex]kx[/itex]. There's no need to split [itex]x[/itex] into [itex]x_1[/itex] and [itex]x_2[/itex] here. Just leave it as [itex]x[/itex]. [Edit: You will need separate accelerations though, [itex]a_1[/itex] and [itex]a_2[/itex].]
- When you set up the equations, pay careful attention to the direction of each force. Pick a direction to represent the positive direction and stick with it. Consistency is important here.
From there, integrate to find the velocities [itex]v_1[/itex] and [itex]v_2[/itex].
[Edit: and here is the tricky bit. The spring's extension [itex]x[/itex] is not constant. It's a function of time. So if you integrate, say, [itex]\int (F_1 - kx)dt[/itex], the answer isn't simply [itex](F_1 - kx)t[/itex]. But the beauty here is that you don't have to actually evaluate the integrals. After setting the velocities equal to each other, differentiate both sides of the equation, thus getting rid of the integrals and the need to perform some nasty integration.]
And with your insight in your original post about the velocities being equal, simple algebra is all that's left.