step 2 is wrong ,
when positive 40 go in rhs than it will become negative and after subtraction it becomes 30 .
and when 5x comes from rhs to lhs than it will -ve that means it become -20x
now , on solving we'll get ;-
-20x = 30
x = 30/-20 => 3/-2 will your answer
hope it helps ;!
#Himanshu jha