A linear function can be written in slope-intercept form, which is
[tex]f(x)=mx+b[/tex]Where m represents the slope and b represents the y-intercept.
We have two points that satisfies this equation. (-2, 6) and (4, -4). If we evaluate both points on the slope-intercept form we're going to create a linear system where the solutions are the values for the slope and y-intercept.
[tex]\begin{gathered} 6=-2m+b \\ -4=4m+b \end{gathered}[/tex]If we subtract the first equation from the second, we're going to have a new equation only for the slope.
[tex]\begin{gathered} (6)-(-4)=(-2m+b)-(4m+b) \\ 6+4=-2m+b-4m-b \\ 10=-6m \\ m=-\frac{10}{6} \\ m=-\frac{5}{3} \end{gathered}[/tex]Using this value for the slope on any of the previous equations, we can determinate the other coefficient
[tex]\begin{gathered} 6=-2\cdot(-\frac{5}{3})+b \\ 6=\frac{10}{3}+b \\ b=6-\frac{10}{3} \\ b=\frac{18}{3}-\frac{10}{3} \\ b=\frac{8}{3} \end{gathered}[/tex]Now that we have both coefficients, we can write our line equation.
[tex]y=-\frac{5}{3}x+\frac{8}{3}[/tex]