To calculate the slope of a line you have to use the following formula
[tex]m=\frac{y_1-y_2}{x_1-x_2}[/tex]Where
(x₁,y₁) are the coordinates of one point on the line
(x₂,y₂) are the coordinates of a second point on the line
For the points (2,5) and (7,15), the slope of a line that crosses them is:
[tex]m=\frac{15-5}{7-2}=\frac{10}{5}=2[/tex]The slope of the line is m=2