The difference of 7 and x is 7-x. The difference of x and 7 is x -7. If you want the positive difference regardless of which (7 or x) is larger, you can make the difference be positive by using the absolute value: |x -7|.
We want numbers such that this difference is 4, so we want the solutions to ...