Ethan tired to write an equation of the linear table but made a mistake. Need help it’s due today!?!?

Given:
The table for a linear function.
To find:
The equation of the linear function.
Solution:
If a linear function passes through two points, then the equation of linear function is:
[tex]y-y_1=\dfrac{y_2-y_1}{x_2-x_1}(x-x_1)[/tex]
Consider any two points from the given table. Let the two points are (2,-2) and (4,0). So, the equation of linear function is
[tex]y-(-2)=\dfrac{0-(-2)}{4-2}(x-2)[/tex]
[tex]y+2=\dfrac{2}{2}(x-2)[/tex]
[tex]y+2=x-2[/tex]
Subtracting 2 from both sides.
[tex]y+2-2=x-2-2[/tex]
[tex]y=x-4[/tex]
So, Ethan 's made a mistake. The sign between x and 4 must be negative but in Ethan's equation it is a positive sign, which is not correct.
Therefore, the required linear equation is [tex]y=x-4[/tex].