I find it easiest to draw a venn-diagram for this kind of question but the answer isn’t too complicated.
11% of the students have a pet dog AND a pet cat. Because of this you want to take away 11% from the percentage of students with a pet dog and also from the percentage with a pet cat. This is because 11% of the students with a pet dog also have a pet cat and vice-versa and you don’t want to count any students twice.
Once you’ve done this it’s very simple, just add up your values, so 11 + (38 - 11) + (24 - 11) which will give you 51.
Hope this helps