Answer:
Dog is 2 years old
Explanation:
Let dog's age = d
Let friend's age = f
Your dog is 8 years younger than your friend:
d +8 = f
In 2 years, your friend will be three times as old as your dog:
3(d+2) = (f+2)
3d+6 = f+2
3d = f - 4
(sub in f=d+8 from above)
3d = f - 4
3d = d+8 - 4
2d = 4
d = 2