We have the equation of motion
, where v i the final velocity, u is the initial velocity, a is the acceleration and s is the displacement
Here final velocity, v = 40m/s
Initial velocity, u = 0 m/s
Displacement s = 2 m
Substituting

So the baseball pitcher accelerates at 400m/
to release a ball at 40 m/s.