We want to find the probability that a student has a dog given that they have a cat, this means that the information given from the side that says " does not have a cat " is irrelevant and we only look at the information from the side that says " has a cat "
Probability = favorable outcomes / total # of outcomes
Favorable outcomes = Having a cat and dog , 6 students have both a cat and dog so favorable outcomes = 6
Total # of outcomes = total # of students that have a cat whether they have a dog or not. Total # of tudents that have a cat = 6 + 2 = 8
So probability of having a dog given that they have a cat = 6/8 or 3/4