The initial velocity of the ball is 20 m/s upward.
The acceleration due to gravity is 9.8 m/s^2 downward.
The time of flight of the ball is 4 seconds.
The velocity of the ball at the top of its trajectory is zero.
The velocity of the ball when it is caught is given by:
```
v = u + at
```
where:
v is the final velocity
u is the initial velocity
a is the acceleration
t is the time
Substituting the given values, we get:
```
v = 20 m/s + (9.8 m/s^2)(4 s)
```
```
v = 20 m/s + 39.2 m/s
```
```
v = 59.2 m/s downward
```
Therefore, the ball was traveling downward at a speed of 59.2 m/s when it was caught.