Your answer is correct in the sense that 14 ≤ x ≤22 since the temperature is 18 ° plus/minus 4°. However, the wording of the problem implies that it wants your final answer in terms of absolute value.
Based on your work, you understand the basics of the problem, and you correctly expressed it as an inequality. The problem is how to express it with an absolute value and only one inequality sign.
The word "within" implies that ≤ is the correct symbol, rather than < (you were correct to use that symbol)
We can word the expression in this way: The difference between the real temperature and 18° is less than or equal to 4. Difference in this sense is a positive number whether the real temperature is lower or higher than 18, so absolute value is implied.
We can express it mathematically this way:
|18-x| ≤ 4
Plug a few numbers in for X to make sure it makes sense.
If X equals 16 (within the range), |18-16| = 2, which is less than 4
If X equals 20, |-2| equals 2, which is less than 4
If X equals 10, |18-10| = 8, does not comply with our inequality.