Formular for equation is y = mx + b
You are given all values of x and y for both equation, now you need to find the gradient.
Formular for gradient is y1 - y2 / x1 - x2
∴ (-6) - 2 / (-3) - 5
(I used the first and last coordinates)
= 1
Now that you have the gradient for the first equation sub it in to the formular.
y = mx + b
2 = (1)5 + b
b = -3
∴ The equation for the first graph is y = x - 3
Similarly do the same for the other equation.
= 12 - 4 / (-1) - 7
= -1
y = mx + b
4 = (-1)7 + b
b = 11
The equation for the second graph is y = -x + 11