The initial velocity of the baseball is 20 m/s towards the bat. After it is struck by the bat its velocity is 30 m/s in a direction away from the bat. The duration of the impact is equal to 0.01 s.
The velocity of the balls changes by 20 - (-30) = 20 + 30 = 50 m/s in a duration of time equal to 0.01 s.
Acceleration is the rate of change of velocity. In the case of the ball, its acceleration during the 0.01 s that it is in contact with the bat is 50/0.01 = 50*100 = 5000 m/s^2.
The acceleration of the ball was 5000 m/s^2.