David and his men travelled from Aphek to Ziklag. They were in Aphek for the purpose of mustering of the Philistine army. After their attempt to join the Philistines and fight from the rear was unsuccessful, they were sent home. The journey from Aphek to Ziklag was approximately 100 kilometres and would have taken at least three days to complete.1
1 Now when David and his men came to Ziklag on the third day, the Amalekites had made a raid against the Negeb and against Ziklag. They had overcome Ziklag and burned it with fire