here collision between two balls is perfectly elastic collision
and the friction force is considered to be zero
now here we can say that momentum conservation is applicable here

here we know that two balls are of same mass then we can say

divide whole equation by mass "m"

now it is also given that it is elastic collision between two balls


now by solving the above two equations we have


so here given that

so the initial speed of ball A was same as final speed of ball B which is given as 12 m/s.
So here final answer will be 12 m/s