Solving equations

Stephen played a game with Jonathon. It was a simple game that required Stephen to accurately guess the number Jonathon was thinking. It goes something like this.

Stephen would ask Jonathon to think of a number but not to announce it. He would then outline the following steps.
-Multiply this number by 5.
-To the result add 3.
-Divide everything by 7
-Finally add 6 to the result above.
Stephen then asked Jonathon to tell him the answer. Ten replied Jonathon. After a few seconds of quiet thinking Stephen proudly announced that the number Jonathon originally thought of was five. Stephen would often change the steps outlined above but always correctly find Jonathon's number.
How was Stephen able to successfully guess the number every time? Simple! He used "backtracking" . First Stephen developed a mathematical equation like the one shown below.

Think of a number. Lets call it "x"
Multiply this number by 5
To the result add 3.
Divide everything by 7
Finally add 6 to the result above.
To get an answer of 10
Stephen took the answer that Jonathon gave him and undid everything that he told Jonathon to do to the number. Stephen started with the last thing he told Jonathon to do.
He took the answer 10
10
To undo the addition of 6 he subtracted 6
10 - 6 = 4
To undo the division by 7 he multiplied the result by 7.
4 X 7 = 28
To undo the addition of 3 he subtracted 3
28 - 3 = 25
To undo the multiplication by five he divided the result by 5.
25/5 = 5
You will come across the word "Undo" often. What does this mean? You already have some idea of this term but click to get an explanation for this if you need to.
Continue