Let the number of people that offer both Mathematics and Physics = y
Then, (32−y)+y+(24−y)+4=40(32 - y) + y + (24 - y) + 4 = 40(32−y)+y+(24−y)+4=40
60−y=40 ⟹ y=2060 - y = 40 \implies y = 2060−y=40⟹y=20
∴\therefore∴ 20 students offer both Mathematics and Physics.