How do you solve for X

When we put 6 in place of x we get:
6 − 2 = 4
which is true
So x = 6 is a solution.
How about other values for x ?
For x=5 we get "5−2=4" which is not true, so x=5 is not a solution.For x=9 we get "9−2=4" which is not true, so x=9 is not a solution.etcIn this case x = 6 is the only solution