When the weighing machine was balanced, LHS = RHS
⇒ 13x + 5 = 31
New RHS = 31 + 2 = 33
If +2 appears on the RHS of the weighing machine, to balance the machine again, we can add 2 to the LHS of the machine, such that LHS = RHS.
Then LHS = (13x + 5) + 2 = 13x + 7
Let us see what happens.The machine is balanced again.