Here are the answers with the correct words chosen:
I was in trouble.
While I was thinking what to do, I saw a woman.