I think you have to treat each body separately. you have a net loss of energy since your coefficient of restitution is less than 1. You should break up the collision into 3 parts. Find the energy before, the change during, and the energy after the collision.
Check this out, it should be of...