- Step 1: Use inclusion-exclusion. Total = Math + Science - Both = $40 + 30 - 20 = 50$.
- Step 2: Verify. Only Math = $40 - 20 = 20$, Only Science = $30 - 20 = 10$, Both = 20. Total = $20 + 10 + 20 = 50$.
- Step 3: Compare with options. Options: (1) 40, (2) 50, (3) 60, (4) 70. Matches 50.
- Step 4: Cross-check. No students outside Math or Science assumed.
- Step 5: Conclusion. Option (2) is correct.