When driving near a distracted driver, you should give them plenty of space and maintain a safe following distance of at least:

Give a distracted driver plenty of space by maintaining a safe following distance of at least three to four seconds. Be very careful when passing a driver who seems to be distracted. Distracted drivers may not be aware of your presence and may drift in front of you.
DMV Writen Test