okay, so one is moving left at 2 m/s (v_{1f} = -2 \frac{m}{s}) and one is moving right at 3 m/s (v_{2f} = 3 \frac{m}{s}.
Another important fact is the particle loses no speed when it hits the wall, so you may assume it just changes direction with the same speed.
(side note: technically, to conserve momentum, you have to assume the wall it hits moves backwards as well, but you can say that the mass of the wall is so huge it barely moves, so m_1 v_{1i}= m_1 v_{1f} + m_{wall} v_{wall} \rightarrow \frac{m_1}{m_{wall}} (v_{1i} - v_{1f}) = v_{wall}, but m_{wall} >> m_1 so v_{wall} is approx 0 )
You can start by calculating how far the one moving left at 2 m/s will get from the point of collision (say x_0 = 0) when the one moving right hits the wall, and then find how long it will take for them to meet with the simple equations:
x_1 (t) = v_{1f} t + x_1
<br />
x_2 (t) = v_{2f} t + x_2<br />
where x_1, x_2 are the initial positions of the masses respectively from the point of collision at the time the second particle strikes the wall,
and find when x_1(t) = x_2 (t), solve for that time and plug it in one of the equations to get the distance.
however, there is a slightly more clever way, using the same methods, where you can solve for it in one less step. In what way can you move the particle and slightly change the situation such that the time the particle takes to get to the wall and back in the original situation is the same but it involves no wall?