It is easy, answer D.
If you see, on answer D commutative property is applied.
-10 - 40 - 90 = -140
-10 - 90 - 40 = -140
It is always -140
It can't be S because -10 - (40-90) = -10 - (-50) = -10 + 50 = 40
It can't be B because -(10-40) - 90 = - (-30) - 90 = + 30 - 90 = - 60
It can't be C because it would give +140
So, answer D is right.