You can draw a specified number of questions from a Question Bank (QB). But you can't tell the program to only draw questions that weren't already drawn from that QB.
However, you could set up 2 separate QBs, each with 5 questions. Then use triggers with conditions on the Results slide to branch:
- If the user fails, they advance to a slide that draws from the second QB.
- If the user passes, they advance to a summary slide (or whatever you want to end with).
You can find out more about QBs and other Storyline basics in the User Guide:
https://community.articulate.com/series/articulate-storyline-360