If A and B are the average temperatures in the two towns then |A-B|≤5 expresses the relationship between their temperatures. This says that the absolute value of their average temperatures is less than or equal to 5 degrees. To solve it algebraically we solve A-B≤5 and B-A≤5. So, given B, A≤B+5 or B-5≤A which is the same as A≥B-5. This can be expressed in two ways: B-5≤A≤B+5 or A is in the closed interval [B-5,B+5].
Now we put B=38 so 33≤A≤43 or A in [33,43].