First find how much faster the dog is than the sheep: 20 feet/second - 12 feet/second = <<20-12=8>>8 feet/second
Then divide the distance the dog needs to run by the speed difference: 160 feet / 8 feet/second = <<160/8=20>>20 seconds
#### 20