People who do the first question correctly can be divided into those who only do the first question and those who do both questions correctly; Similarly, people who do the second question correctly can be divided into those who only do the second question correctly and those who do both questions correctly.
The person who does the first question correctly plus the person who does the second question correctly is equal to the person who does both questions correctly in the class. So the answer is 48 people.