To calculate the slope of a linear function, you need two points that are cut by said line and use the following formula:
m= slope
X1,Y1 are the coordinates of the first point P1
X2,Y2 are the coordinates for the second point P2
P1(5,-1)
P2(-3,-4)
The slope for the line that links both points is m=3/8