This question is a Wizard-level, four-segment motion. There are two northward movements and two southward movements. When it comes to the direction-ignorant distance quantity, these directions do not matter. Simply add up the length of the four movements and you have calculated the amount of ground that is covered.
The quantity displacement is a direction-conscious quantity. Direction matters! Both northward movements take the tennis ball away from the starting position; they add together to give the tennis ball a northward displacement. But the southward movements negate these motions and take the tennis ball past the starting point. To determine the overall displacment or change in position, these two southward movements must be subtracted from the two northward movements.
A common approach for questions like these involves defining North as the positive direction and South as the negative direction. A 22-meter northward movement is thought of as a -22 m displacement. The overall displacement is the sum of two positive (North) and two negative (South) movements. If the sum turns out to be negative, then the direction is opposite of North; that is, it would be South.
Finally, this 4-segment "Wizard" level question is more difficult. As such, it becomes useful to learn to diagram the situation. Draw an arrow for each segment of the motion; and draw the arrow in the described direction and approximately the relative length. Where one arrow ends, the next arrow begins. The process of diagramming helps a learner to visualize displacement as the overall change in position relative to the starting position.