Short answer, 10kg, it must be the same mass as Ball 1
Long calculation to prove the answer:
M1 = Mass of Ball 1
M2 = Mass of Ball 2
U1 = Initial speed of Ball 1
U2 = Initial speed of Ball 2
V1 = Final speed of Ball 1
V2 = Final speed of Ball 2
M1U1 + M2U2 = M1V1 + M2V2
10 x 20 + M2 x 20 = 10 x 40 + M2 x 0
200 + 20M2 = 400
20M2 = 200
M2 = 200 / 20
M2 = 10 kg
Alternatively you could say that because the velocity of ball 1 increased by the exact velocity of ball 2, their masses must be equal, so both ball 1 and 2 are 10 kg.