Has the book shown or explained how to finger notes running up and down the keybed?
I will assume not, so try this.
First with the thumb on your right hand number 1 the remaining fingers are 2, 3, 4 & 5.
Starting on C play it with your thumb (1)
Play D with 2
Play E with 3
Play F with 1 by bringing 1 under the other fingers
Play G with 2
Play A with 3
Play B with 4
Play C with 5
Now moving down
Play C with 5
Play B with 4
Play A with 3
Play G with 2
Play F with 1
Play E with 3 by bringing 3 over the other fingers
Play D with 2
Play C with 1
If you spend a few minutes a day practicing this with both right and left hands it will become second nature. You can use it if you practice Scales.
What it is then used for is when you scan your sheet music you see where a specific digit can be used to play the note since this digit places the hand in the best position for subsequent notes.
In your image the one beat rest gives time to reposition the hand and as Paul stated use 2 to play the D then as you play notes up to the A with 5 it puts your hand in a static position so as you play the notes coming back down the C is played with 1, so it is all about ease of movement.
TIP
Using a metronome as you practice the hand movements will help timing and you can start slow and move up to faster Tempos which in future will help fast keyboard runs.