Let x be the number under the question.
Then the number of correct answers is (20-x), and your equation is
100*(20-x) - 40x = 180 (counting points) ====>
2000 - 100x - 40x = 180
2000 - 180 = 140x
140x = 1820 ====> x = = 13.
Answer. 13 wrong answers and the rest 20-13 = 7 correct answers.
Check. 7*100 - 13*40 = 180 points. ! Correct !