What did David want to know when he prayed to Yahweh?
David wanted to know, if he pursued after the Amalekites, would he overtake them.
What was Yahweh's answer to David?
Yahweh told him to pursue the troop, be successful, and recover everything that had been taken.