#### Answer

The velocity of the ball at $t=2$ is $$v=-24ft/s$$

#### Work Step by Step

The function of height after $t$ seconds: $$y=f(t)=40t-16t^2$$
The velocity of a ball thrown into the air: $v_i=40ft/s$
*Find the function of the change of velocity over time:
According to definition, the function of the instantaneous $v(a)$ at time $t=a$ is $$v(a)=\lim\limits_{h\to0}\frac{f(t+h)-f(t)}{h}$$$$v(a)=\lim\limits_{h\to0}\frac{40(t+h)-16(t+h)^2-(40t-16t^2)}{h}$$$$v(a)=\lim\limits_{h\to0}\frac{(40t+40h)+(-16t^2-16h^2-32th)-40t+16t^2}{h}$$$$v(a)=\lim\limits_{h\to0}\frac{40h-16h^2-32th}{h}$$$$v(a)=\lim\limits_{h\to0}(40-16h-32t)$$$$v(a)=40-16\times0-32t$$$$v(a)=40-32t$$
Therefore, the velocity of the ball at time $t=2$ is $$v=40-32\times2=-24ft/s$$
This answer shows that within 2 seconds, the ball has reached the top and at the time $t=2$, the ball is falling down with a speed of $24ft/s$.
(Since velocity is a vector, it can have negative values. The negative sign shows that the object has moved in the other direction from the initial one. Speed, however, is not a vector, so it can only have positive values.)