When 31 times a number is increased by 40, the answer is the same as when 200 is decreased by the number

n - a number
31 times a number is increased by 40 is equal 200 is decreased by the number
31n + 40 = 200 - n subtract 40 from both sides
31n = 160 - n add n to both sides
32n = 160 divide both sides by 32
n = 5