Hi there!
We can use Newton's Second Law:

∑F = net force (N)
m = mass (kg)
a = acceleration (m/s²)
We are given the mass and acceleration, so:
∑F = 20 · 2 = <u>40 N</u>
Answer:The mass of ball B is 10 kg.
Explanation;
Mass of ball A = 
Velocity of the ball A before collision:
Velocity of ball A after collision=
Mass of ball B= 
Velocity of the ball B before collision:
Velocity of ball B after collision=



The mass of ball B is 10 kg.