well slope formula is rise/run. So for the first one you start at the point rise 2 run 5 and you reach the endpoint. That is how you know you got the correct slope. (2/5)
For the second one you start at the first point and you cannot go up because it is a negative slope you run 6 till you hit the other point go down 2. Since you go down 2 that would make it -2. (-2,6)