For similar triangles, the ratio of their matching or corresponding sides are equal. The diagram below illustrates this in a special case. For each straight line, its slope m is the proportionality constant linking the rises to runs for any two points on the line. The rest of this webpage is a digression Linear Algebra and Slopes of straight lines. Here is formula for calculating m given two points on the line.
Text books prefer to use x's and y's with subscript to denote the two points.
I leave the change of notation to you. This if and only if assumption is needed to link coordinates with geometry. The previous equation might be called the x-intercept equation for a line. These simultaneous equations must have a unique solution if the lines are different and not parallel. The solution of these equations can be complicated by requiring you the learner to obtain them from data such as two points on a line, or slope and point, or slope-intercept information.