Colloquial reductions of TO in sentences

There are some American accents that would pronounce to as /də/, but this is not standard, and I wouldn't recommend practicing it.

What is much more common is to "flap" the /t/.

Flapping or tapping, also known as alveolar flapping, intervocalic flapping, or t-voicing, is a phonological process found in many varieties of English, especially North American, Australian and New Zealand English, whereby the voiceless alveolar stop consonant phoneme /t/ is pronounced as a voiced alveolar flap [ɾ], a sound produced by briefly tapping the alveolar ridge with the tongue, when placed between vowels.

https://en.wikipedia.org/wiki/Flapping

This voiced alveolar flap is not really a [d] sound, but it's similar. The author of your book didn't want to confuse readers who probably know what "d" means, but not "ɾ".

This is not something native speakers are taught, and it's not something we try to do. Thus, there are not "rules" governing the use of the flap t. However, its use can be very consistent, and it's easy to see patterns. The pattern being presented in your book is this:

The exact conditions for flapping in North American English are unknown, although it is widely understood that it occurs in an alveolar stop, /t/ or /d/, when placed between two vowels, provided the second vowel is unstressed (as in butter, writing, wedding, loader).[5][12] Across word boundaries, however, it can occur between any two vowels, provided the second vowel begins a word (as in get over [ɡɛɾˈoʊvɚ]).

(Wikipedia, again)