First, you need to find the slope between the two points:
![\begin{aligned}(8-2)/(-1-1) & = (6)/(-2)\\[0.5em]&=-3\endaligned}](https://img.qammunity.org/2024/formulas/mathematics/high-school/sj05ykyf1pan8zod9cvb4fdclkbmx07xtl.png)
Now, you use one of the points to find the equation.
You can use point-slope form:
y - 1 = -3 (x-2)
Or you can use slope-intercept form:
y = -3x + 5
Note:
You can find the slope-intercept form by taking y = mx + b and substituting in the slope and a point and solving for b:
2 = -3 (1) + b