Concept:
The average (mean) of a set of values is the sum of the values divided by the total number of values ($\text{Average} = \text{Sum} / N$). We can rearrange this to find the total sum: $\text{Sum} = \text{Average} \times N$. By finding the difference between the total sums before and after the students leave, we can determine the exact combined score of the departing students.
Step 1: Calculate the initial total marks.
The class originally had 30 students with an average of 80 marks.
$$\text{Total Initial Sum} = 30 \times 80 = 2400$$
Step 2: Calculate the new total marks after students leave.
Two students left, meaning there are $30 - 2 = 28$ students remaining.
Their new average is 82.
$$\text{Total New Sum} = 28 \times 82 = 2296$$
Step 3: Find the combined marks of the leaving students.
The difference between the initial total and the new total represents the marks that "left" the room.
$$\text{Sum of Left Students} = \text{Initial Sum} - \text{New Sum}$$
$$\text{Sum of Left Students} = 2400 - 2296 = 104$$
Step 4: Set up the final average calculation.
The question asks for the average marks of these two specific students, not their total.
$$\text{Average of Left Students} = \frac{\text{Combined Marks}}{2}$$
Step 5: Perform the final division.
Divide the sum by 2:
$$\text{Average} = \frac{104}{2} = 52$$
Hence the correct answer is (D) 52.