I had a look before deciding to post this, but nothing really answers what I am specifically looking for.
From my understanding the following is correct (let me know if I am mistaken):
宿題をしてしまいましたか? Did you finish your homework? - Bringing something to a close or finish
宿題を忘れてしまいました。 I forgot my homework. - To accidentally do or not do something.
However I don't quite understand what it means when used with ば conditions. I think it may mean "All I have to do is ~" but I am not sure. For example:
宿題をしてしまえばいい。(not sure if this is even grammatically correct) All I have to do is my homework.
逃げてしまえばいい。 All I have to do is run away.
If someone could please explain this to me using some more example sentence that would be great. Thanks.