Energy transfer in collisions between two vibrating molecules