Let the marks of Devi be x and Ali be y.
So, the equations:
2y = x and y + 16 = x
So,
2y = y + 16. [ because we know equals are equal to equals]
=> 2y - y = 16
=> y = 16
Check
Ali's marks are half of Devi's marks.
Devi's marks are 16 more than alis.
So, Devi's marks will be 16×2 = 32 and 32 is 16 greater than 16 (16+16=32).