When describing an action that takes place during a period of time (say, five days), whether you use in or within depends on how the sentence is structured.
In is used when you provide a range of time for the action.
Your order will be shipped in three to five days.
Meaning, it will be shipped three, four, or five days from now.
Use within when you provide just the final (maximum) date or time.
Exam results will be returned within five days.
They will be returned sometime during the next five days; no later. It could be sooner than that, but it won’t be later. Resist the temptation to say, “Exam results will be returned within three to five days.”