23 students have dogs and 20 students have cats. However 3 students have both animals. So, its really 20 students that only have dogs, 17 students that only have cats, 3 students who have both, and 5 people who have neither.
20 + 17 + 3 + 5=45
the answer would be H I believe.