I have found that the best way to solve this is a combination of conservation of momentum and the relative velocity condition. This system of linear equations can be solved generally:
m1v1 + m2v2 = m1v1' + m2v2' and ε(v1-v2) = v2' - v1'
You can use the second equation to find v2' in terms of v1, v2, and v1' and substitute into 1st equation to get v1' in terms of the initial data:
v1' = (1/(m1+m2)((m1-εm2)v1 + (1+ε)m2v2)) Note that v2' is the same equation with all subscripts switched between 1 and 2
Elastic collision is ε=1 and nonelastic is ε=0 (In physics, the terms elastic, inelastic, and perfectly inelastic are used. I prefer the terminology perfectly elastic, partially elastic, and inelastic because perfectly elastic is not seengenerally whereas perfectly inelastic is seen all the time, macroscopically)
You can just substitute in the masses and velocities (note v2 is -3 m/s if E is taken to be +)
Please consider a tutor. Take care.