To scare the bear away, make loud noises by yelling, banging pots and pans or using an airhorn. Make yourself look as big as possible by waving your arms.
Most dogs can't outrun a bear. Average dogs can run up to 31MPH, while bears can run at speeds more than 35MPH. The fastest dogs in the world can run around 40MPH but bears can likely reach those speeds as well.