Here’s the correct arrangement of the words in the sentences:
We thought our invention would work, but it failed. We will not rest until we figure out why.
So, the filled sentences are:
- "We thought our invention would work, but it failed."
- "We will not rest until we figure out why."