M=y2-y1/X2-x1 solve y2
M = (y₂ - y₁) / (x₂ - x₁)Multiply each side by (x₂ - x₁): M/(x₂ - x₁) = (y₂ - y₁)Add y₁ to each side: y₂ = M/(x₂ - x₁) + y₁