I'm not quite happy with my justification of a problem. I'm not posting this in the homework section because it's not homework, and my trouble with doesn't revolve around finding the answer. The problem is this:

I based my answer around kinetic energy. We can let [itex]v_1[/itex] and [itex]v_2[/itex] be the velocities of the masses relative to the center of mass, and [itex]v[/itex] be the velocity of the center of mass. The total initial energy of the system (before the spring is compressed) as: [itex]E=\frac{m_1}{2}v_1^2+\frac{m_1}{2}v_1^2+\frac{M}{2}v^2[/itex]. (where [itex]M[/itex] is the total mass of the system) My argument is that we want to minimize the amount of energy locked up in the movement of the center of mass so that the energy can be used to give potential energy to the spring. So then:
[itex]\frac{M}{2}v^2=\frac{m_1+m_2}{2}\cdot \frac{(m_1 v_1+m_2 v_2)^2}{(m_1+m_2)^2}[/itex].
We also have [itex]J=\frac{1}{2}mv^2\rightarrow v=\sqrt{\frac{2 J}{m}}[/itex]. The other velocity is zero, so:
[itex]\frac{(m_1 v_1+m_2 v_2)^2}{2(m_1+m_2)}=\frac{(m_1 v_1)^2}{2(m_1+m_2)}[/itex]
Since the bottom is constant we can just consider the top term
[itex]=m_1^2 v_1^2=m_1^2\frac{2 J}{m_1}=m_1 2 J[/itex]
To minimize this term, we obviously need to use the 2kg mass. The second part can be completed in the same way by setting the center-of-mass's velocity to be zero.

My question is... how can I justify this better? I'm really uncomfortable with energy based arguments

I do not quite see why did you use the idea with the mass center. Besides, I think you have doubled the energy in your term for [itex]E[/itex], but I might have misunderstood something.

Anyway, why don't you simple state, that the larger compression will be the result of a larger force in the spring. And since [itex]F = dp/dt[/itex], then the larger change of momentum will imply larger force.

Now, [itex]dp = p_2 - p_1[/itex] and if we attach the spring to the mass that was initialy at rest, we have [itex]p_1 = 0[/itex]. So [itex]F \propto p_2[/itex]. You will now need to consider two cases:

1. Moving mass [itex]m_2=8 kg[/itex]
2. Moving mass [itex]m_2 = 2 kg[/itex]

From each of them you will receive different velocities of this mass. Then you apply the conservation of momentum to find the velocity [itex] v_f [/itex] of the whole system (moving together as one body) after the impact. Having this velocity you will be able to establish [itex] p_2[/itex] for each case and compare them.