You must wait 3 days to retake the examination. Since you failed Part 2 (laws), you will only need to take Part 2 again. You have 90 days from the original examination date to pass the part that you failed. Past 90 days, you must take both Part 1 & Part 2.
REMEMBER: You must apply for your insurance license within 1 year of completing your pre-licensing course or you start over.