The equation to represent the age of a dog in people years is p=6(d-1)+21 where p represents the age of a dog in people years, and d represents its age in dog years. How old is a dog if he is 17 in people years?