C. The final velocity is half of train car B's initial velocity.
Step-by-step explanation:
Let's solve the problem by using the law of conservation of momentum.
The initial momentum of the system is:

where m is the mass of car B (equal to the mass of car A) and
is the initial velocity of car B. There is no contribution to the momentum from car A, since car A is at rest, so its momentum is zero.
The momentum of the system after the collision is:

where we wrote (m+m) because now both cars travel together, so their new mass is (m+m), and v is their final velocity.
By using conservation of momentum:



so, the final velocity is half of train car B's initial velocity.