Step-by-step explanation:
this is actually not as simple as it sounds here.
quite some energy is lost in the deformation of the bodies of car and truck, and it also needs more energy to get a standing object going than to accelerate an already moving object.
but assuming the simple described circumstances, then the energy and impulse of the moving truck of 5000 kg is transferred to a new combined system of car and truck of now 5000 + 3000 = 8000 kg.
so, the 20m/s inertia energy of the truck is now distributed to the truck/car combination.
since the same energy has to move now more mass, it is clear that the combined speed will be lower.
20×5000 = x×8000
20×5 = x×8
x = 100/8 = 12.5 m/s
that is the resulting speed of the combined truck/car object.