The equation would work because in the first situation it was x times 2 but when you divide by 2 before multilingual creating half an x in the end which would very the result but by just multiplying at first by 2 changes the equation's answer to 3 always. This is a simple trick to get many math problems right that might save many minutes of time on your homework or life's work.
And it started as this step guide to get to 3. ( each step feeds off of the answer from the last step)
Write down a number
Double your number
Add 6 to the answer
Divide the answer by 2
Subtract the original value from your answer from step 4