Formular for straight line
y = mx + c
[tex] m= \frac{y_1-y_2}{x_1-x_2} \\ m= \frac{1-8}{-2-5} \\ m= \frac{-7}{-7} \\ m=1 [/tex]
1 = 1(-2) + c
1 = -2 + c
c = 3
y = x + 3
Checking:
y = x + 3
When x = -2
y = -2 + 3
y = 1
Coordinates is (-2, 1)
When x = 5
y = 5 + 3
y = 8
Coordinates is (5, 8)
Both coordinates matches the question
∴ Answer is correct