To calculate the slope of a line you have to use the following formula
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:
The slope of the line is m=2