How to use "failing" in a sentence

Sentences

After trying and failing to keep him quiet, I kept away from him in other rooms in the house.