Let 'x' be the negative integer

let 'y' be the positive integer

--------

since we are talking about the distance of the two numbers in the number line then we take the absolute values of the two

-------------

since they are 18 units apart then,

|x|+|y| = 18 -------equation 1

the absolute value of the positive integer is 5 times the absolute value of the negative integer

|y| = 5|x| ------equation 2

----------

since we've already assigned signs to the variables, then we may take equations 1&2 in its positive sense

x+y =18 -----equation 1'

y =5x ------equation 2'

---------

substitute equation 2' to equation 1'

x+y =18

x+(5x) = 18

6x = 18

divide the whole equation with 6

x = 3

----------

substitute x=3 to equation 2'

y = 5x

y = 5 (3)

y = 15

----------

Since we assign 'x' as negative and 'y' as positive then

x=-3

y=15

the two numbers are -3 & 15