\(=40+139-172+99-139-199+127\)
\(=(139-139)+(99-199)+(127-172+40)\)
\(=0-100+(-45+40)\)
\(=-100-5\)
\(=-105\)
\(40+\left(139-172+99\right)-\left(139+199-127\right)\\ =40+66-211\\ =106-211=-105\)
40 + ( 139 - 172 + 99 ) - (139 +199 -127 )
=40+66-211
=106-211
=-105