I need help understanding rate of change and slope.

"Rate of change" is a measure of how much some dependent variable changes with respect to a change in the independent variable. Given a function [tex]y(x)[/tex], the average rate of change over some interval [tex][a,b][/tex] is given by what's called the difference quotient,
[tex]\dfrac{y(b)-y(a)}{b-a}[/tex]
If [tex]y(x)[/tex] is a linear function, then the average rate of change is constant regardless of the interval chosen.
A line represents a linear function. The slope of the line represents the linear function's rate of change. We pick any two points on the line, [tex](a,y(a))[/tex] and [tex](b,y(b))[/tex] where [tex]a<b[/tex], and the slope of the line through them is exactly the value of the expression above. Then there are 3 possible scenarios:
(1) If [tex]a\neq b[/tex], then the slope can be any real number. If [tex]y(a)=y(b)[/tex] happens to be true, then the slope is 0 and the line is horizontal.
(2) If [tex]a=b[/tex] and [tex]y(a)\neq y(b)[/tex], the slope is undefined (some might say infinite) and the line is vertical.
(3) If [tex]a=b[/tex] and [tex]y(a)=y(b)[/tex], then we're talking about just one point. But there are infinitely many possible lines through a single point, so the slope is undefined.
Some examples in practice:
23. The slope of the line through (-5, 0) and (-5, 5) is
[tex]\dfrac{5-0}{-5-(-5)}[/tex]
The [tex]x[/tex]-coordinates match but the [tex]y[/tex]-coordinates don't, so this line is vertical and the slope is undefined (or infinite).
27. The slope is
[tex]\dfrac{\frac37-\frac47}{\frac25-\frac15}=\dfrac{-\frac17}{\frac15}=-\dfrac57[/tex]
Notice the order in which we plug in the given points' coordinates. Always take [tex]a[/tex] to be the lesser of the two points' [tex]x[/tex]-coordinates! The convention is to always take points left to right.
We use the same principles to work backwards:
31. Given a slope of 1/4 through two points (7, 4) and (3, y), we have
[tex]\dfrac{4-y}{7-3}=\dfrac{4-y}4=\dfrac14\implies4-y=1\implies y=3[/tex]